Rank-2 update

SSPR2/DSPR2/CHPR2/ZHPR2

Name SSPR2/DSPR2/CHPR2/ZHPR2

Rank-2 update

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

A ← αxy* + α yx* + A,

where A is an n-by-nreal symmetric or complex Hermitian matrix stored in packed form as described in “Matrix Storage,” α is a complex scalar, α is the complex conjugate of α, x and y are real or complex n-vectors, and x* and y* are the conjugate transposes of x and y, respectively. (The conjugate of a real scalar is just the scalar, and the conjugate transpose of a real vector is simply the transpose.)

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

SSPR2

or

DSPR2

A is a real symmetric matrix

CHPR2

or

ZHPR2

A is a complex Hermitian matrix

Refer to “F_SSPR2/F_DSPR2/F_CSPR2/F_ZSPR2” on page 386 and

“F_CHPR2/F_ZHPR2” on page 352 for a description of the equivalent BLAS Standard subprograms.

Matrix Because either triangle of A can be obtained from the other, you only need to

Storage provide one triangle of A, either the upper or the lower triangle. Compared to storing the entire matrix, you save memory by supplying that triangle stored column-by-column in packed form in a 1-dimensional array.

The following examples illustrate the packed storage of symmetric or

Hermitian matrices.

Chapter 3 Basic Matrix Operations 259