Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

cblas_?her2k

Performs a Hermitian rank-2k update.

Syntax

void cblas_cher2k (const CBLAS_LAYOUT Layout, const CBLAS_UPLO uplo, const CBLAS_TRANSPOSE trans, const MKL_INT n, const MKL_INT k, const void *alpha, const void *a, const MKL_INT lda, const void *b, const MKL_INT ldb, const float beta, void *c, const MKL_INT ldc);

void cblas_zher2k (const CBLAS_LAYOUT Layout, const CBLAS_UPLO uplo, const CBLAS_TRANSPOSE trans, const MKL_INT n, const MKL_INT k, const void *alpha, const void *a, const MKL_INT lda, const void *b, const MKL_INT ldb, const double beta, void *c, const MKL_INT ldc);

Include Files

  • mkl.h

Description

The ?her2k routines perform a rank-2k matrix-matrix operation using general matrices A and B and a Hermitian matrix C. The operation is defined as

C := alpha*A*BH + conjg(alpha)B*AH + beta*C

or

C := alpha*AH*B + conjg(alpha)*BH*A + beta*C

where:

alpha is a scalar and beta is a real scalar.

C is an n-by-n Hermitian matrix.

A and B are n-by-k matrices in the first case and k-by-n matrices in the second case.

Input Parameters

Layout

Specifies whether two-dimensional array storage is row-major (CblasRowMajor) or column-major (CblasColMajor).

uplo

Specifies whether the upper or lower triangular part of the array c is used.

If uplo = CblasUpper, then the upper triangular of the array c is used.

If uplo = CblasLower, then the low triangular of the array c is used.

trans

Specifies the operation:

iftrans=CblasNoTrans, then C:=alpha*A*BH + alpha*B*AH + beta*C;

if trans=CblasConjTrans, then C:=alpha*AH*B + alpha*BH*A + beta*C.

n

Specifies the order of the matrix C. The value of n must be at least zero.

k

With trans=CblasNoTrans specifies the number of columns of the matrix A, and with trans=CblasConjTrans, k specifies the number of rows of the matrix A.

The value of k must be at least equal to zero.

alpha

Specifies the scalar alpha.

a
 

trans=CblasNoTrans

trans=CblasConjTrans

Layout = CblasColMajor

Array, size lda*k.

Before entry, the leading n-by-k part of the array a must contain the matrix A.

Array, size lda*n.

Before entry, the leading k-by-n part of the array a must contain the matrix A.

Layout = CblasRowMajor

Array, size lda*n.

Before entry, the leading k-by-n part of the array a must contain the matrix A.

Array, size lda*k.

Before entry, the leading n-by-k part of the array a must contain the matrix A.

lda

Specifies the leading dimension of a as declared in the calling (sub)program.

 

trans=CblasNoTrans

trans=CblasConjTrans

Layout = CblasColMajor

lda must be at least max(1, n).

lda must be at least max(1, k)

Layout = CblasRowMajor

lda must be at least max(1, k)

lda must be at least max(1, n).

beta

Specifies the scalar beta.

b
 

trans=CblasNoTrans

trans=CblasConjTrans

Layout = CblasColMajor

Array, size ldb*k.

Before entry, the leading n-by-k part of the array b must contain the matrix B.

Array, size ldb*n.

Before entry, the leading k-by-n part of the array b must contain the matrix B.

Layout = CblasRowMajor

Array, size lda*n.

Before entry, the leading k-by-n part of the array b must contain the matrix B.

Array, size lda*k.

Before entry, the leading n-by-k part of the array b must contain the matrix B.

ldb

Specifies the leading dimension of a as declared in the calling (sub)program.

 

trans=CblasNoTrans

trans=CblasConjTrans

Layout = CblasColMajor

ldb must be at least max(1, n).

ldb must be at least max(1, k)

Layout = CblasRowMajor

ldb must be at least max(1, k)

ldb must be at least max(1, n).

c

Array, size ldc by n.

Before entry withuplo = CblasUpper, the leading n-by-n upper triangular part of the array c must contain the upper triangular part of the Hermitian matrix and the strictly lower triangular part of c is not referenced.

Before entry with uplo = CblasLower, the leading n-by-n lower triangular part of the array c must contain the lower triangular part of the Hermitian matrix and the strictly upper triangular part of c is not referenced.

The imaginary parts of the diagonal elements need not be set, they are assumed to be zero.

ldc

Specifies the leading dimension of c as declared in the calling (sub)program. The value of ldc must be at least max(1, n).

Output Parameters

c

With uplo = CblasUpper, the upper triangular part of the array c is overwritten by the upper triangular part of the updated matrix.

With uplo = CblasLower, the lower triangular part of the array c is overwritten by the lower triangular part of the updated matrix.

The imaginary parts of the diagonal elements are set to zero.