CHERK or ZHERK Subroutine

Purpose

Performs Hermitian rank k operations.

Library

BLAS Library (libblas.a)

FORTRAN Syntax

SUBROUTINE CHERK(UPLO, TRANS, N, K, ALPHA,
A, LDA, BETA, C, LDC)
CHARACTER*1  UPLO, TRANS
INTEGER  N, K, LDA, LDC
REAL  ALPHA, BETA
COMPLEX  A(LDA,*),  C(LDC,*)

SUBROUTINE ZHERK(UPLO, TRANS, N, K, ALPHA,
A, LDA, BETA, C, LDC)
CHARACTER*1 UPLO,TRANS
INTEGER N,K,LDA,LDC
DOUBLE PRECISION ALPHA,BETA
COMPLEX*16 A(LDA,*), C(LDC,*)

Description

The CHERK or ZHERK subroutine performs one of the Hermitian rank k operations:

C := alpha * A * conjg( A' ) + beta * C

OR

C := alpha * conjg( A' ) * A + beta * C

where 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.

Parameters

Item Description
UPLO On entry, UPLO specifies whether the upper or lower triangular part of the array C is to be referenced as follows:
UPLO = 'U' or 'u'
Only the upper triangular part of C is to be referenced.
UPLO = 'L' or 'l'
Only the lower triangular part of C is to be referenced.

Unchanged on exit.

TRANS On entry, TRANS specifies the operation to be performed as follows:
TRANS = 'N' or 'n'
C := alpha * A * conjg( A' ) + beta * C
TRANS = 'C' or 'c'
C := alpha * conjg( A' ) * A + beta * C

Unchanged on exit.

N On entry, N specifies the order of the matrix C; N must be at least 0; unchanged on exit.
K On entry with TRANS = 'N' or 'n', K specifies the number of columns of the matrix A, and on entry with TRANS = 'C' or 'c', K specifies the number of rows of the matrix A; K must be at least 0; unchanged on exit.
ALPHA On entry, ALPHA specifies the scalar alpha; unchanged on exit.
A An array of dimension ( LDA, KA ), where KA is K when TRANS = 'N' or 'n', and is N otherwise; on 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; unchanged on exit.
LDA On entry, LDA specifies the first dimension of A as declared in the calling (sub) program. When TRANS = 'N' or 'n', LDA must be at least max( 1, N ), otherwise LDA must be at least max( 1, K ); unchanged on exit.
BETA On entry, BETA specifies the scalar beta; unchanged on exit.
C An array of dimension ( LDC, N ); on entry with UPLO = 'U' or 'u', 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; on exit, the upper triangular part of the array C is overwritten by the upper triangular part of the updated matrix; on entry with UPLO = 'L' or 'l', 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; on exit, 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 need not be set, they are assumed to be 0, and on exit they are set to 0.
LDC On entry, LDC specifies the first dimension of C as declared in the calling (sub) program; LDC must be at least max( 1, N ); unchanged on exit.