# ?tfsm

Solves a matrix equation (one operand is a triangular matrix in RFP format).

## Syntax

call stfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)

call dtfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)

call ctfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)

call ztfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)

• mkl.fi

## Description

The ?tfsm routines solve one of the following matrix equations:

`op(A)*X = alpha*B,`

or

`X*op(A) = alpha*B,`

where:

alpha is a scalar,

X and B are m-by-n matrices,

A is a unit, or non-unit, upper or lower triangular matrix in rectangular full packed (RFP) format.

op(A) can be one of the following:

• op(A) = A or op(A) = AT for real flavors

• op(A) = A or op(A) = AH for complex flavors

The matrix B is overwritten by the solution matrix X.

## Input Parameters

transr

CHARACTER*1.

if transr = 'N' or 'n', the normal form of RFP A is stored;

if transr = 'T' or 't', the transpose form of RFP A is stored;

if transr = 'C' or 'c', the conjugate-transpose form of RFP A is stored.

side

CHARACTER*1. Specifies whether op(A) appears on the left or right of X in the equation:

if side = 'L' or 'l', then op(A)*X = alpha*B;

if side = 'R' or 'r', then X*op(A) = alpha*B.

uplo

CHARACTER*1. Specifies whether the RFP matrix A is upper or lower triangular:

if uplo = 'U' or 'u', then the matrix is upper triangular;

if uplo = 'L' or 'l', then the matrix is low triangular.

trans

CHARACTER*1. Specifies the form of op(A) used in the matrix multiplication:

if trans = 'N' or 'n', then op(A) = A;

if trans = 'T' or 't', then op(A) = A';

if trans = 'C' or 'c', then op(A) = conjg(A').

diag

CHARACTER*1. Specifies whether the RFP matrix A is unit triangular:

if diag = 'U' or 'u' then the matrix is unit triangular;

if diag = 'N' or 'n', then the matrix is not unit triangular.

m

INTEGER. Specifies the number of rows of B. The value of m must be at least zero.

n

INTEGER. Specifies the number of columns of B. The value of n must be at least zero.

alpha

REAL for stfsm

DOUBLE PRECISION for dtfsm

COMPLEX for ctfsm

DOUBLE COMPLEX for ztfsm

Specifies the scalar alpha.

When alpha is zero, then a is not referenced and b need not be set before entry.

a

REAL for stfsm

DOUBLE PRECISION for dtfsm

COMPLEX for ctfsm

DOUBLE COMPLEX for ztfsm

Array, size (n*(n+1)/2). Contains the matrix A in RFP format.

b

REAL for stfsm

DOUBLE PRECISION for dtfsm

COMPLEX for ctfsm

DOUBLE COMPLEX for ztfsm

Array, size (1, ldb*n)

Before entry, the leading m-by-n part of the array b must contain the right-hand side matrix B.

ldb

INTEGER. Specifies the leading dimension of b as declared in the calling (sub)program. The value of ldb must be at least max(1, m).

## Output Parameters

b

Overwritten by the solution matrix X.

For more complete information about compiler optimizations, see our Optimization Notice.