Rank-1 update

SSYR/DSYR/CHER/ZHER

Name SSYR/DSYR/CHER/ZHER

Rank-1 update

Purpose These subprograms compute the real symmetric or complex Hermitian rank-1 update

A ← αxx* + A,

where A is an n-by-nreal symmetric or complex Hermitian matrix, α is a real scalar, x is a real or complex n-vector, and x* is the conjugate transpose of x. (The conjugate transpose of a real vector is simply the transpose.)

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

SSYR

or

DSYR

A is a real symmetric matrix

CHER

or

ZHER

A is a complex Hermitian matrix

Refer to “F_SSYR/F_DSYR/F_CSYR/F_ZSYR” on page 392, and

“F_CHER/F_ZHER” on page 344 for equivalent BLAS Standard subprograms.

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

Storage reference and apply the update to only one triangle of A. You can supply either the upper or the lower triangle of A, 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

INTEGER*4

n, lda, incx

REAL*4

alpha, a(lda, n), x(lenx)

CALL SSYR(uplo, n, alpha, x, incx, a, lda)

CHARACTER*1

uplo

INTEGER*4

n, lda, incx

REAL*8

alpha, a(lda, n), x(lenx)

CALL DSYR(uplo, n, alpha, x, incx, a, lda)

CHARACTER*1

uplo

INTEGER*4

n, lda, incx

REAL*4

alpha

COMPLEX*8

a(lda, n), x(lenx)

CALL CHER(uplo, n, alpha, x, incx, a, lda)

Chapter 3 Basic Matrix Operations 275