STRMM/DTRMM/CTRMM/ZTRMM

Triangular matrix-matrix multiply

Example 1 Form the REAL*4 matrix product AB, where A is a 6-by-6 nonunit-diagonal, upper-triangular real matrix stored in an array A whose dimensions are

10-by-10 and B is a 6-by-8 real matrix stored in an array B of dimension 10-by-10. The matrix product overwrites the input B matrix.

CHARACTER*1 SIDE,UPLO,TRANSA,DIAG

INTEGER*4 M,N,LDA,LDB

REAL*4 ALPHA,A(10,10),B(10,10)

SIDE = ’L’

UPLO = ’U’

TRANSA = ’N’

DIAG = ’N’

M = 6

N = 8

ALPHA = 1.0

LDA = 10

LDB = 10

CALL STRMM (SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)

Example 2 Form the REAL*8 matrix product qBAT, where q is a real scalar, B is a 6-by-8 real matrix stored in an array B of dimension 10-by-10, and A is a 8-by-8 unit-diagonal lower-triangular real matrix stored in an array A whose dimensions are 10-by-10. The matrix product overwrites the input B matrix.

INTEGER*4

M,N,LDA,LDB

REAL*8

Q,A(10,10),B(10,10)

M = 6

 

N = 8

 

LDA = 10

 

LDB = 10

 

CALL DTRMM (’RIGHT’,’LOWER’,’TRANS’,’UNIT’,M,N,Q,A,LDA,B,LDB)

322HP MLIB User’s Guide