F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

NAG Library Routine DocumentF06ZRF (ZHER2K)

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

F06ZRF (ZHER2K) performs one of the Hermitian rank-$2k$ update operations
 $C←αABH + α-BAH + βC or C←αAHB + α-BHA+βC ,$
where $A$ and $B$ are complex matrices, $C$ is an $n$ by $n$ complex Hermitian matrix, $\alpha$ is a complex scalar, and $\beta$ is a real scalar.

2  Specification

 SUBROUTINE F06ZRF ( UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
 INTEGER N, K, LDA, LDB, LDC REAL (KIND=nag_wp) BETA COMPLEX (KIND=nag_wp) ALPHA, A(LDA,*), B(LDB,*), C(LDC,*) CHARACTER(1) UPLO, TRANS
The routine may be called by its BLAS name zher2k.

None.

None.

5  Parameters

1:     UPLO – CHARACTER(1)Input
On entry: specifies whether the upper or lower triangular part of $C$ is stored.
${\mathbf{UPLO}}=\text{'U'}$
The upper triangular part of $C$ is stored.
${\mathbf{UPLO}}=\text{'L'}$
The lower triangular part of $C$ is stored.
Constraint: ${\mathbf{UPLO}}=\text{'U'}$ or $\text{'L'}$.
2:     TRANS – CHARACTER(1)Input
On entry: specifies the operation to be performed.
${\mathbf{TRANS}}=\text{'N'}$
$C←\alpha A{B}^{\mathrm{H}}+\stackrel{-}{\alpha }B{A}^{\mathrm{H}}+\beta C$.
${\mathbf{TRANS}}=\text{'C'}$
$C←\alpha {A}^{\mathrm{H}}B+\stackrel{-}{\alpha }{B}^{\mathrm{H}}A+\beta C$.
Constraint: ${\mathbf{TRANS}}=\text{'N'}$ or $\text{'C'}$.
3:     N – INTEGERInput
On entry: $n$, the order of the matrix $C$; the number of rows of $A$ and $B$ if ${\mathbf{TRANS}}=\text{'N'}$, or the number of columns of $A$ and $B$ if ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$.
Constraint: ${\mathbf{N}}\ge 0$.
4:     K – INTEGERInput
On entry: $k$, the number of columns of $A$ and $B$ if ${\mathbf{TRANS}}=\text{'N'}$, or the number of rows of $A$ and $B$ if ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$.
Constraint: ${\mathbf{K}}\ge 0$.
5:     ALPHA – COMPLEX (KIND=nag_wp)Input
On entry: the scalar $\alpha$.
6:     A(LDA,$*$) – 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{K}}\right)$ if ${\mathbf{TRANS}}=\text{'N'}$ and at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$ if ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$.
On entry: the matrix $A$; $A$ is $n$ by $k$ if ${\mathbf{TRANS}}=\text{'N'}$, or $k$ by $n$ if ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$.
7:     LDA – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F06ZRF (ZHER2K) is called.
Constraints:
• if ${\mathbf{TRANS}}=\text{'N'}$, ${\mathbf{LDA}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$;
• if ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$, ${\mathbf{LDA}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{K}}\right)$.
8:     B(LDB,$*$) – 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{K}}\right)$ if ${\mathbf{TRANS}}=\text{'N'}$ and at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$ if ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$.
On entry: the matrix $B$; $B$ is $n$ by $k$ if ${\mathbf{TRANS}}=\text{'N'}$, or $k$ by $n$ if ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$.
9:     LDB – INTEGERInput
On entry: the first dimension of the array B as declared in the (sub)program from which F06ZRF (ZHER2K) is called.
Constraints:
• if ${\mathbf{TRANS}}=\text{'N'}$, ${\mathbf{LDB}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$;
• if ${\mathbf{TRANS}}=\text{'T'}$ or $\text{'C'}$, ${\mathbf{LDB}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{K}}\right)$.
10:   BETA – REAL (KIND=nag_wp)Input
On entry: the scalar $\beta$.
11:   C(LDC,$*$) – 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 $n$ by $n$ Hermitian matrix $C$.
• If ${\mathbf{UPLO}}=\text{'U'}$, the upper triangular part of $C$ 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 $C$ must be stored and the elements of the array above the diagonal are not referenced.
On exit: the updated matrix $C$. The imaginary parts of the diagonal elements are set to zero.
12:   LDC – INTEGERInput
On entry: the first dimension of the array C as declared in the (sub)program from which F06ZRF (ZHER2K) is called.
Constraint: ${\mathbf{LDC}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.

None.

Not applicable.