Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

STRSM(3dxml)  —  Subroutines

Name

strsm, dtrsm, ctrsm, ztrsm − Solve a triangular system of equations with a triangular coefficient matrix

FORMAT

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

Arguments

sidecharacter∗1
On entry, specifies whether (op)A is on the left side or the right side of X in the system of equations:

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

If side = ’R’ or ’r’, the system is X (op)A   =  alpha ∗ B. 
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 system of equations:

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 m of the matrix B; m >= 0
On exit, m is unchanged. 

ninteger∗4
On entry, the number of columns n 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 right-hand-side matrix B.
On exit, b is overwritten by the m by n solution matrix X. 

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

Description

The _TRSM routines solve a triangular system of equations where the coefficient matrix A is a triangular matrix: (op)AX  =  alpha ∗ B X(op)A   =  alpha ∗ B
(op)A = A, transp(A),  or  conjug_transp(A) , alpha is a scalar, X and B are m by n matrices, and A is a unit or non-unit, upper- or lower-triangular matrix.

Example

REAL∗8 A(100,40), B(40,20), alpha
M = 16
N = 18
LDA = 100
LDB = 40
alpha = 2.0D0
CALL DTRSM (’L’,’U’,’N’,’U’,M,N,alpha,A,LDA,B,LDB)

This FORTRAN code solves the system AX=alpha ∗ B where A is an upper-triangular real matrix with a unit diagonal. X and B are 16 by 18 matrices. The leading 16 by 16 upper-triangular part of the array A must contain the upper-triangular matrix A. The leading 16 by 18 part of the array B must contain the matrix B. The lower-triangular part of A and the diagonal are not referenced.  The leading 16 by 18 part of B is overwritten by the solution matrix X.

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