HP MLIB User's Guide Vol. 1 7th Ed.
240 HP MLIB User’s Guide
SGER/DGER/CGERC/CGERU/ZGERC/ZGERU Rank-1 update
Notes These subprograms conform to specifications of the Level 2 BLAS.
If an error in the arguments is detected, the subprograms call error handler
XERBLA, which writes an error message onto the standard error file and
terminates execution. The standard version of XERBLA (refer to the end of this
chapter) can be replaced with a user-supplied version to change the error
procedure. Error conditions are
m < 0
n < 0
lda < max(m,1)
incx = 0
incy = 0
Example 1 Apply a REAL*4 rank-1 update xy
T
to A, where A is a 6-by-9 real matrix stored
in an array A whose dimensions are 10-by-10, x is a real vector 6 elements long
stored in an array X of dimension 10, and y is a real vector 9 elements long
stored in an array Y, also of dimension 10.
INTEGER*4 M,N,LDA,INCX,INCY
REAL*4 ALPHA,A(10,10),X(10),Y(10)
M = 6
N = 9
ALPHA = 1.0
LDA = 10
INCX = 1
INCY = 1
CALL SGER (M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
Example 2 Apply a COMPLEX*8 conjugated rank-1 update −2xy* to A, where A is a 6-by-9
complex matrix stored in an array A whose dimensions are 10 by 10, x is a
complex vector 6 elements long stored in an array X of dimension 10, and y is a
complex vector 9 elements long stored in an array Y, also of dimension 10.
INTEGER*4 M,N,LDA
COMPLEX*8 A(10,10),X(10),Y(10)
M = 6
N = 9
LDA = 10
CALL CGERC (M,N,(-2.0E0,0.0E0),X,1,Y,1,A,LDA)