Rank-k update

SSYRK/DSYRK/CHERK/CSYRK/ZHERK/ZSYRK

Name SSYRK/DSYRK/CHERK/CSYRK/ZHERK/ZSYRK

Rank-k update

Purpose These subprograms apply a rank-kupdate to a real symmetric, complex symmetric, or complex Hermitian matrix; specifically they compute

C ← αA AT + βC,

C ← α AT A + βC,

C ← αAA* + βC,

C ← αA* A + βC,

where α and β are scalars, C is an n-by-nreal symmetric, complex symmetric, or complex Hermitian matrix, and A is a matrix whose size, either n-by-kor

k-by-n, depends on which form of the update is requested. Here, AT and A* are the transpose and conjugate transpose of A, respectively.

The structure of C is indicated by the name of the subprogram used:

SSYRK

or

DSYRK

C is a real symmetric matrix

CHERK

or

ZHERK

C is a complex Hermitian matrix

CSYRK

or

ZSYRK

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, ldc

REAL*4

alpha, beta, a(lda, *), c(ldc, n)

CALL SSYRK(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)

CHARACTER*1

uplo, trans

INTEGER*4

n, k, lda, ldc

REAL*8

alpha, beta, a(lda, *), c(ldc, n)

CALL DSYRK(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)

CHARACTER*1

uplo, trans

INTEGER*4

n, k, lda, ldc

REAL*4

alpha, beta

COMPLEX*8

a(lda, *), c(ldc, n)

CALL CHERK(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)

Chapter 3 Basic Matrix Operations 289