CHERK(3dxml) — Subroutines
Name
cherk, zherk − Rank-k update of a complex hermitian matrix
FORMAT
{C,Z}HERK ( uplo, trans, n, k, alpha, a, lda, beta, c, ldc )
Arguments
uplocharacter∗1
On entry, specifies whether the upper- or lower-triangular part of the Hermitian matrix C is to be referenced:
If uplo = ’U’ or ’u’, the upper-triangular part of C is to be referenced.
If uplo = ’L’ or ’l’, the lower-triangular part of C is to be referenced.
On exit, uplo is unchanged.
transcharacter∗1
On entry, specifies the operation to be performed:
If trans = ’N’ or ’n’, C = alpha ∗ A∗conjug_transp(A) + beta∗C
If trans = ’C’ or ’c’, C = alpha∗conjug_transp(A)A + beta∗C
On exit, trans is unchanged.
ninteger∗4
On entry, the order of the matrix C; n >= 0
On exit, n is unchanged.
kinteger∗4
On entry, the number of columns of the matrix A when trans = ’N’ or the number of rows of the matrix A when trans = ’C’ or
On exit, k is unchanged.
alphareal∗4 | real∗8
On entry, specifies the scalar alpha.
On exit, alpha is unchanged.
acomplex∗8 | complex∗16
On entry, a two-dimensional array A with dimensions lda by ka.
For trans = ’N’ or ka >= k and the leading n by k portion of the array A contains the matrix A.
For trans = ’T’, ka >= n and the leading k by n part of the array A contains the matrix A.
On exit, a is unchanged.
ldainteger∗4
On entry, the first dimension of array A.
For trans = ’N’ or ’n’ lda >= MAX(1,n).
For trans = ’C’ or lda >= MAX(1,k).
On exit, lda is unchanged.
betareal∗4 | real∗8
On entry, the scalar beta.
On exit, beta is unchanged.
ccomplex∗8 | complex∗16
On entry, a two-dimensional array C of dimensions ldc by at least n.
If uplo specifies the upper part, the leading n by n upper-triangular part of the array C must contain the upper-triangular part of the Hermitian matrix C, and the strictly lower-triangular part of C is not referenced.
If uplo specifies the lower part, the leading n by n lower-triangular part of the array C must contain the lower-triangular part of the Hermitian matrix C, 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 0, and on exit, they are set to 0.
On exit, c is overwritten; the triangular part of the array C is overwritten by the triangular part of the updated matrix.
ldcinteger∗4
On entry, the first dimension of array C; ldc >= MAX(1,n)
On exit, ldc is unchanged.
Description
CHERK and ZHERK perform the rank-k update of a complex Hermitian matrix: C = alpha ∗ A∗conjug_transp(A) + beta∗C C = alpha∗conjug_transp(A)A + beta∗C
alpha and beta are real scalars, C is an n by n Hermitian matrix, and A is an n by k matrix in the first case and a k by n matrix in the second case.
Example
COMPLEX∗8 A(40,20), C(20,20)
REAL∗4 alpha, beta
LDA = 40
LDC = 20
N = 10
K = 15
alpha = (1.0)
beta = (2.0)
CALL CHERK (’U’,’N’,N,K,alpha,A,LDA,beta,C,LDC)
This FORTRAN code computes the rank-k update of the complex Hermitian matrix C: C = alpha ∗ A∗conjug_transp(A) + beta∗C. C is a 10 by 10 matrix, and A is a 10 by 15 matrix. Only the upper-triangular part of C is referenced. The leading 10 by 15 part of array A contains the matrix A. The leading 10 by 10 upper-triangular part of array C contains the upper-triangular matrix C.