HP MLIB User's Guide Vol. 1 7th Ed.
268 HP MLIB User’s Guide
SSYMM/DSYMM/CHEMM/CSYMM/ZHEMM/ZSYMM Matrix-matrix multiply
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
side ≠ ’L’ or ’l’ or ’R’ or ’r’
uplo ≠ ’L’ or ’l’ or ’U’ or ’u’
m < 0
n < 0
lda too small
ldb < max(m,1)
ldc < max(m,1)
Actual character arguments in a subroutine call can be longer than the
corresponding dummy arguments. Therefore, readability of the CALL
statement may be improved, for example, by coding the side argument as
’LEFT’ for ’L’ or ’RIGHT’ for ’R’. Refer to “Example 2.”
Example 1 Form the REAL*4 matrix product C = AB, where A is a 6-by-6 real symmetric
real matrix whose upper triangle is stored in the upper triangle of an array A of
dimension 10-by-10, B is a 6-by-8 real matrix stored in an array B of dimension
10-by-10, and C is a 6-by-8 real matrix stored in an array C, also of dimension
10-by-10.
CHARACTER*1 SIDE,UPLO
INTEGER*4 M,N,LDA,LDB,LDC
REAL*4 ALPHA,BETA,A(10,10),B(10,10),C(10,10)
SIDE = ’L’
UPLO = ’U’
M = 6
N = 8
ALPHA = 1.0
BETA = 0.0
LDA = 10
LDB = 10
LDC = 10
CALL SSYMM (SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
Example 2 Form the COMPLEX*8 matrix-matrix product , where ρ is a
scalar, A is an 8-by-8 complex Hermitian matrix whose lower triangle is stored
in the lower triangle of an array A of dimension 10-by-10, B is a 6-by-8 complex
matrix stored in an array whose dimensions are 10-by-10, and C is a 6-by-8
complex matrix stored in an array C, also of dimension 10-by-10.
C
1
2
---
BA ρC–=