HP MLIB User's Guide Vol. 1 7th Ed.
352 HP MLIB User’s Guide
F_CHPR2/F_ZHPR2 Hermitian rank-2 update
Name F_CHPR2/F_ZHPR2
Hermitian rank-2 update
Purpose F_xHPR2 performs the Hermitian rank-2 update
where A is an n-by-n complex Hermitian matrix stored in packed form, α is a
complex scalar, is the complex conjugate of α, x and y are complex n-vectors,
and x* and y* are the conjugate transposes of x and y, respectively. This routine
returns immediately if n is less than or equal to zero.
Refer to “SSPR2/DSPR2/CHPR2/ZHPR2” on page 259 for a description of the
equivalent HP MLIB legacy BLAS subprograms and an illustration of the
packed storage of symmetric or Hermitian matrices.
Matrix
Storage
Because either triangle of A can be obtained from the other, you only need to
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 (refer to the AP
matrix).
Usage VECLIB
INTEGER*4 INCX, INCY, LDA, N, UPLO
REAL*4 BETA
COMPLEX*8 ALPHA, A( LDA, * ), X( * ), Y( * )
SUBROUTINE F_CHER2 (UPLO, N, ALPHA, X, INCX, Y, INCY, BETA, AP)
INTEGER*4 INCX, INCY, LDA, N, UPLO
REAL*8 BETA
COMPLEX*16 ALPHA, A( LDA, * ), X( * ), Y( * )
SUBROUTINE F_ZHER2 (UPLO, N, ALPHA, X, INCX, Y, INCY, BETA, AP)
VECLIB8
INTEGER*8 INCX, INCY, LDA, N, UPLO
REAL*4 BETA
COMPLEX*8 ALPHA, A( LDA, * ), X( * ), Y( * )
SUBROUTINE F_CHER2 (UPLO, N, ALPHA, X, INCX, Y, INCY, BETA, AP)
INTEGER*8 INCX, INCY, LDA, N, UPLO
REAL*8 BETA
COMPLEX*16 ALPHA, A( LDA, * ), X( * ), Y( * )
SUBROUTINE F_ZHER2 (UPLO, N, ALPHA, X, INCX, Y, INCY, BETA, AP)
A αxy
∗
ayx
∗
βA with A=A
∗
++←
α