HP MLIB User's Guide Vol. 1 7th Ed.
Chapter 3 Basic Matrix Operations 279
Rank-2 update SSYR2/DSYR2/CHER2/ZHER2
Name SSYR2/DSYR2/CHER2/ZHER2
Rank-2 update
Purpose These subprograms compute the real symmetric or complex Hermitian rank-2
update
where A is an n-by-n real symmetric or complex Hermitian matrix, α 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:
Refer to “F_SSYR2/F_DSYR2/F_CSYR2/F_ZSYR2” on page 394, and
“F_CHER2/F_ZHER2” on page 346 for equivalent BLAS Standard
subprograms.
Matrix
Storage
Because either triangle of A can be obtained from the other, these subprograms
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, incy
REAL*4 alpha, a(lda, n), x(lenx), y(leny)
CALL SSYR2(uplo, n, alpha, x, incx, y, incy, a, lda)
CHARACTER*1 uplo
INTEGER*4 n, lda, incx, incy
REAL*8 alpha, a(lda, n), x(lenx), y(leny)
CALL DSYR2(uplo, n, alpha, x, incx, y, incy, a, lda)
CHARACTER*1 uplo
INTEGER*4 n, lda, incx, incy
COMPLEX*8 alpha, a(lda, n), x(lenx), y(leny)
CALL CHER2(uplo, n, alpha, x, incx, y, incy, a, lda)
SSYR2 or DSYR2 A is a real symmetric matrix
CHER2 or ZHER2 A is a complex Hermitian matrix
A αxy*←αyx* A,++
α