Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

STRMM(3dxml)  —  Subroutines

Name

strmm, dtrmm, ctrmm, ztrmm − Matrix-matrix product for triangular matrix

FORMAT

{S,D,C,Z}TRMM ( side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb )

Arguments

sidecharacter∗1
On entry, specifies whether (op)A multiplies B on the left or right in the operation:

If side = ’L’ or ’l’, the operation is B  =  alpha ∗ (op)A∗B. 

If side = ’R’ or ’r’, the operation is B  =  alpha ∗ B ∗ (op)A . 
On exit, side is unchanged. 

uplocharacter∗1
On entry, specifies whether the matrix A is an upper- or lower-triangular matrix:

If uplo = ’U’ or ’u’, the matrix A is an upper-triangular matrix. 

If uplo = ’L’ or ’l’, the matrix A is a lower-triangular matrix. 
On exit, uplo is unchanged. 

transacharacter∗1
On entry, specifies the form of (op)A used in the matrix multiplication:

If transa = ’N’ or ’n’, (op)A = A. 

If transa = ’T’ or ’t’, (op)A = transp(A). 

If transa = ’C’ or ’c’, (op)A = conjug_transp(A). 
On exit, transa is unchanged. 

diagcharacter∗1
On entry, specifies whether the matrix A is unit-triangular:

If diag = ’U’ or ’u’, A is a unit-triangular matrix. 

If diag = ’N’ or ’n’, A is not a unit-triangular matrix. 
On exit, diag is unchanged. 

minteger∗4
On entry, the number of rows of the matrix B; m >= 0
On exit, m is unchanged. 

ninteger∗4
On entry, the number of columns of the matrix B; n >= 0
On exit, n is unchanged. 

alphareal∗4 | real∗8 | complex∗8 | complex∗16
On entry, specifies the scalar alpha.
On exit, alpha is unchanged. 

areal∗4 | real∗8 | complex∗8 | complex∗16
On entry, a two-dimensional array A with dimensions lda by k.
If the multiplication is on the left side, k >= m and the leading m by m part of the array contains the matrix A.
If the multiplication is on the right side, k >= n and the leading n by n part of the array A must contain the matrix A.
In either case, when the leading part of the array is specified as the  upper part, the upper triangular part of array A contains the upper-triangular part of the matrix A, and the lower-triangular part of matrix A is not referenced. When the lower part is specified, the lower triangular part of the array A contains the lower triangular part of the matrix  A, and the upper-triangular part of A is not  referenced.

If matrix A is unit-triangular, its diagonal elements are assumed to be unity and are not referenced. 
On exit, a is unchanged. 

ldainteger∗4
On entry, the first dimension of A. When multiplication is on the left, lda >= MAX(1,m). When multiplication is on the right, lda >= MAX(1,n).
On exit, lda is unchanged. 

breal∗4 | real∗8 | complex∗8 | complex∗16
On entry, a two-dimensional array B of dimensions ldb by at least n. The leading m by n part of the array B must contain the matrix B.
On exit, b is overwritten by the m by n updated matrix. 

ldbinteger∗4
On entry, the first dimension of B; ldb >= MAX(1,m)
On exit, ldb is unchanged. 

Description

STRMM and DTRMM compute a matrix-matrix product for a real triangular matrix or its transpose.  CTRMM and ZTRMM compute a matrix-matrix product for a complex triangular matrix, its transpose, or its conjugate transpose.  B  = alpha(op)A∗B
  B  = alpha ∗ B((op)A)

where (op)A = A, transp(A),  or conjug_transp(A)

alpha is a scalar, B is an m by n matrix, and A is a unit or non-unit, upper- or lower-triangular matrix. 

Example

REAL∗8 A(25,40), B(30,35), alpha
M = 15
N = 18
LDA = 25
LDB = 30
alpha = -1.0D0
CALL DTRMM (’R’,’L’,’T’,’U’,M,N,alpha,A,LDA,B,LDB)

This FORTRAN code computes the product B  =  alpha ∗ B∗transp(A) where A is a lower-triangular real matrix with a unit diagonal. A is an 18 by 18 real triangular matrix embedded in array A, and B is a 15 by 18 real rectangular matrix embedded in array B. The leading 18 by 18 lower-triangular part of the array A must contain the lower-triangular matrix A.  The upper-triangular part of A and the diagonal are not referenced.

COMPLEX∗16 A(25,40), B(30,35), alpha
M = 15
N = 18
LDA = 25
LDB = 30
alpha = (-1.0D0, 2.0D0)
CALL ZTRMM (’R’,’L’,’T’,’U’,M,N,alpha,A,LDA,B,LDB)

This FORTRAN code computes the product B  =  alpha ∗ B∗transp(A) where A is a lower-triangular complex matrix with a unit diagonal. A is an 18 by 18 complex triangular matrix embedded in array A, and B is a 15 by 18 complex rectangular matrix embedded in array B. The leading 18 by 18 lower-triangular part of the array A must contain the lower-triangular matrix A.  The upper-triangular part of A and the diagonal are not referenced.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026