HP MLIB User's Guide Vol. 1 7th Ed.

284 HP MLIB User’s Guide
SSYR2K/DSYR2K/CHER2K/CSYR2K/ZHER2K/ZSYR2K Rank-2k update
Name SSYR2K/DSYR2K/CHER2K/CSYR2K/ZHER2K/ZSYR2K
Rank-2k update
Purpose These subprograms apply a symmetric or Hermitian rank-2k update to a real
symmetric, complex symmetric, or complex Hermitian matrix; specifically they
compute the following operations:
for symmetric C: and
for Hermitian C: and
where α and β are scalars, is the complex conjugate of α, C is an n-by-n real
symmetric, complex symmetric, or complex Hermitian matrix, and A and B are
matrices whose size, either n-by-k or k-by-n, depends on which form of the
update is requested. Here, A
T
and B
T
are the transposes and A*and B* are the
conjugate transposes of A and B, respectively. (The conjugate of a real scalar is
just the scalar, and the conjugate transpose of a real matrix is simply the
transpose.)
The structure of C is indicated by the name of the subprogram used:
Matrix
Storage
Because either triangle of C can be obtained from the other, these subprograms
reference and apply the update to only one triangle of C. You can supply either
the upper or the lower triangle of C, in a two-dimensional array large enough to
hold the entire matrix, and the same triangle of the updated matrix is returned
in the array. The other triangle of the array is not referenced.
Usage VECLIB:
CHARACTER*1 uplo, trans
INTEGER*4 n, k, lda, ldb, ldc
REAL*4 alpha, beta, a(lda, *), b(ldb, *), c(ldc, n)
CALL SSYR2K(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CHARACTER*1 uplo, trans
INTEGER*4 n, k, lda, ldb, ldc
REAL*8 alpha, beta, a(lda, *), b(ldb, *), c(ldc, n)
CALL DSYR2K(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SSYR2K or DSYR2K C is a real symmetric matrix
CHER2K or ZHER2K C is a complex Hermitian matrix
CSYR2K or ZSYR2K C is a complex symmetric matrix
CaAB
T
←αAB
T
βC++ C αA
T
B←αB
T
A βC++
C αAB*←αBA* βC++ C αA*B←αB* A βC++
α