Developer Reference for Intel® oneAPI Math Kernel Library for C
?herk
Performs a Hermitian rank-k update.
Syntax
void cblas_cherk(const CBLAS_LAYOUT Layout, const CBLAS_UPLO uplo,
const CBLAS_TRANSPOSE trans, const MKL_INT n, const MKL_INT k,
const float alpha, const void *a, const MKL_INT lda, const float beta,
void *c, const MKL_INT ldc);
void cblas_zherk(const CBLAS_LAYOUT Layout, const CBLAS_UPLO uplo,
const CBLAS_TRANSPOSE trans, const MKL_INT n, const MKL_INT k,
const double alpha, const void *a, const MKL_INT lda, const double beta,
void *c, const MKL_INT ldc);
Include Files
mkl.h
Description
The ?herk routines perform a rank-k matrix-matrix operation using a general matrix A and a Hermitian matrix C . The operation is defined as: C := alpha * A * AH + beta * C ,
or C := alpha * AH * A + beta * C ,
where:
alpha and beta are real scalars,
C is an n -by- n Hermitian matrix,
A is an n -by- k matrix in the first case and a k -by- n matrix 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 part of the array c is used.
If uplo = CblasLower , then the low triangular part of the array c is used.
trans
Specifies the operation:
if trans = CblasNoTrans , then C := alpha*A*A^{H} + beta*C ;
if trans = CblasConjTrans , then C := alpha*A^{H}*A + beta*C .
n
Specifies the order of the matrix C . The value of n must be at least zero.
k
With trans = CblasNoTrans , k 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 zero.
- alpha
-
REAL for cherk DOUBLE PRECISION for zherk Specifies the scalar alpha .
- a
-
COMPLEX for cherk DOUBLE COMPLEX for zherk Array, size (lda, ka) , where ka is k when trans= 'N' or 'n' , and is n otherwise. Before entry with trans= 'N' or 'n' , the leading n -by- k part of the array a must contain the matrix a , otherwise the leading k -by- n part of the array a must contain the matrix A .
lda
Specifies the leading dimension of a as declared in the calling (sub)program. When trans= 'N' or 'n' , then lda must be at least max(1, n) , otherwise lda must be at least max(1, k) .
- beta
-
REAL for cherk DOUBLE PRECISION for zherk Specifies the scalar beta .
- c
-
COMPLEX for cherk DOUBLE COMPLEX for zherk Array, size ldc by n .
Before entry with uplo = 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.
BLAS 95 Interface Notes
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.