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-2kupdate to a real symmetric, complex symmetric, or complex Hermitian matrix; specifically they compute the following operations:

for symmetric C: C aABT + α ABT + βC and C ← α AT B + αBT A + βC

for Hermitian C: C ← αAB* + αBA* + βC and C ← αA*B + αB* A + βC

where α and β are scalars, α is the complex conjugate of α, C is an n-by-nreal symmetric, complex symmetric, or complex Hermitian matrix, and A and B are matrices whose size, either n-by-kor k-by-n, depends on which form of the

update is requested. Here, AT and BT 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:

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

Matrix Because either triangle of C can be obtained from the other, these subprograms

Storage 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)

284HP MLIB User’s Guide