CHEMM or ZHEMM Subroutine

Purpose

Performs matrix-matrix operations on Hermitian matrices.

Library

BLAS Library (libblas.a)

FORTRAN Syntax

SUBROUTINE CHEMM(SIDE, UPLO, M, N, ALPHA, A,
LDA, B, LDB, BETA, C, LDC)
CHARACTER*1  SIDE, UPLO
INTEGER  M, N, LDA, LDB, LDC
COMPLEX  ALPHA, BETA
COMPLEX  A(LDA,*),  B(LDB,*),  C(LDC,*)

SUBROUTINE ZHEMM(SIDE, UPLO, M, N, ALPHA, A,
LDA, B, LDB, BETA, C, LDC)
CHARACTER*1 SIDE,UPLO
INTEGER M,N,LDA,LDB,LDC
COMPLEX*16 ALPHA,BETA
COMPLEX*16 A(LDA,*), B(LDB,*), C(LDC,*)

Purpose

The CHEMM or ZHEMM subroutine performs one of the matrix-matrix operations:

C := alpha * A * B + beta * C

OR

C := alpha * B * A + beta * C

where alpha and beta are scalars, A is an Hermitian matrix, and B and C are M by N matrices.

Parameters

Item Description
SIDE On entry, SIDE specifies whether the Hermitian matrix A appears on the left or right in the operation as follows:
SIDE = 'L' or 'l'
C := alpha * A * B + beta * C
SIDE = 'R' or 'r'
C := alpha * B * A + beta * C

Unchanged on exit.

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

Unchanged on exit.

M On entry, M specifies the number of rows of the matrix C; M must be at least 0; unchanged on exit.
N On entry, N specifies the number of columns of the matrix C; N 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 M when SIDE = 'L' or 'l' and is N otherwise; on entry with SIDE = 'L' or 'l', the M by M part of the array A must contain the Hermitian matrix, such that when UPLO = 'U' or 'u', the leading M by M upper triangular part of the array A must contain the upper triangular part of the Hermitian matrix and the strictly lower triangular part of A is not referenced, and when UPLO = 'L' or 'l', the leading M by M lower triangular part of the array A must contain the lower triangular part of the Hermitian matrix and the strictly upper triangular part of A is not referenced; on entry with SIDE = 'R' or 'r', the N by N part of the array A must contain the Hermitian matrix, such that when UPLO = 'U' or 'u', the leading N by N upper triangular part of the array A must contain the upper triangular part of the Hermitian matrix and the strictly lower triangular part of A is not referenced, and when UPLO = 'L' or 'l', the leading N by N lower triangular part of the array A must contain the lower triangular part of the Hermitian matrix and the strictly upper triangular part of A is not referenced. The imaginary parts of the diagonal elements need not be set, they are assumed to be 0; unchanged on exit.
LDA On entry, LDA specifies the first dimension of A as declared in the calling (sub) program. When SIDE = 'L' or 'l' then LDA must be at least max( 1, M ), otherwise LDA must be at least max( 1, N ); unchanged on exit.
B An array of dimension ( LDB, N ); on entry, the leading M by N part of the array B must contain the matrix B; unchanged on exit.
LDB On entry, LDB specifies the first dimension of B as declared in the calling (sub) program; LDB must be at least max( 1, M ); unchanged on exit.
BETA On entry, BETA specifies the scalar beta. When BETA is supplied as 0 then C need not be set on input; unchanged on exit.
C An array of dimension ( LDC, N ); on entry, the leading M by N part of the array C must contain the matrix C, except when beta is 0, in which case C need not be set on entry; on exit, the array C is overwritten by the M by N updated matrix.
LDC On entry, LDC specifies the first dimension of C as declared in the calling (sub) program; LDC must be at least max( 1, M ); unchanged on exit.