F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF06ZCF (ZHEMM)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

F06ZCF (ZHEMM) performs one of the matrix-matrix operations
 $C←αAB + βC or C←αBA + βC ,$
where $A$ is a complex Hermitian matrix, $B$ and $C$ are $m$ by $n$ complex matrices, and $\alpha$ and $\beta$ are complex scalars.

## 2  Specification

 SUBROUTINE F06ZCF ( SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
 INTEGER M, N, LDA, LDB, LDC COMPLEX (KIND=nag_wp) ALPHA, A(LDA,*), B(LDB,*), BETA, C(LDC,*) CHARACTER(1) SIDE, UPLO
The routine may be called by its BLAS name zhemm.

None.

None.

## 5  Parameters

1:     $\mathrm{SIDE}$ – CHARACTER(1)Input
On entry: specifies whether $B$ is operated on from the left or the right.
${\mathbf{SIDE}}=\text{'L'}$
$B$ is pre-multiplied from the left.
${\mathbf{SIDE}}=\text{'R'}$
$B$ is post-multiplied from the right.
Constraint: ${\mathbf{SIDE}}=\text{'L'}$ or $\text{'R'}$.
2:     $\mathrm{UPLO}$ – CHARACTER(1)Input
On entry: specifies whether the upper or lower triangular part of $A$ is stored.
${\mathbf{UPLO}}=\text{'U'}$
The upper triangular part of $A$ is stored.
${\mathbf{UPLO}}=\text{'L'}$
The lower triangular part of $A$ is stored.
Constraint: ${\mathbf{UPLO}}=\text{'U'}$ or $\text{'L'}$.
3:     $\mathrm{M}$ – INTEGERInput
On entry: $m$, the number of rows of the matrices $B$ and $C$; the order of $A$ if ${\mathbf{SIDE}}=\text{'L'}$.
Constraint: ${\mathbf{M}}\ge 0$.
4:     $\mathrm{N}$ – INTEGERInput
On entry: $n$, the number of columns of the matrices $B$ and $C$; the order of $A$ if ${\mathbf{SIDE}}=\text{'R'}$.
Constraint: ${\mathbf{N}}\ge 0$.
5:     $\mathrm{ALPHA}$ – COMPLEX (KIND=nag_wp)Input
On entry: the scalar $\alpha$.
6:     $\mathrm{A}\left({\mathbf{LDA}},*\right)$ – COMPLEX (KIND=nag_wp) arrayInput
Note: the second dimension of the array A must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$ if ${\mathbf{SIDE}}=\text{'L'}$ and at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$ if ${\mathbf{SIDE}}=\text{'R'}$.
On entry: the Hermitian matrix $A$; $A$ is $m$ by $m$ if ${\mathbf{SIDE}}=\text{'L'}$, or $n$ by $n$ if ${\mathbf{SIDE}}=\text{'R'}$.
• If ${\mathbf{UPLO}}=\text{'U'}$, the upper triangular part of $A$ must be stored and the elements of the array below the diagonal are not referenced.
• If ${\mathbf{UPLO}}=\text{'L'}$, the lower triangular part of $A$ must be stored and the elements of the array above the diagonal are not referenced.
7:     $\mathrm{LDA}$ – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F06ZCF (ZHEMM) is called.
Constraints:
• if ${\mathbf{SIDE}}=\text{'L'}$, ${\mathbf{LDA}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$;
• if ${\mathbf{SIDE}}=\text{'R'}$, ${\mathbf{LDA}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
8:     $\mathrm{B}\left({\mathbf{LDB}},*\right)$ – COMPLEX (KIND=nag_wp) arrayInput
Note: the second dimension of the array B must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
On entry: the $m$ by $n$ matrix $B$.
9:     $\mathrm{LDB}$ – INTEGERInput
On entry: the first dimension of the array B as declared in the (sub)program from which F06ZCF (ZHEMM) is called.
Constraint: ${\mathbf{LDB}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$.
10:   $\mathrm{BETA}$ – COMPLEX (KIND=nag_wp)Input
On entry: the scalar $\beta$.
11:   $\mathrm{C}\left({\mathbf{LDC}},*\right)$ – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array C must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
On entry: the $m$ by $n$ matrix $C$.
If ${\mathbf{BETA}}=0$, C need not be set.
On exit: the updated matrix $C$.
12:   $\mathrm{LDC}$ – INTEGERInput
On entry: the first dimension of the array C as declared in the (sub)program from which F06ZCF (ZHEMM) is called.
Constraint: ${\mathbf{LDC}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$.

None.

Not applicable.

Not applicable.