F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF06ZFF (ZTRMM)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

F06ZFF (ZTRMM) performs one of the matrix-matrix operations
 $B←αAB, B←αATB, B←αAHB, B←αBA, B←αBAT or B←αBAH,$
where $B$ is an $m$ by $n$ complex matrix, $A$ is a complex triangular matrix, and $\alpha$ is a complex scalar.

## 2  Specification

 SUBROUTINE F06ZFF ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
 INTEGER M, N, LDA, LDB COMPLEX (KIND=nag_wp) ALPHA, A(LDA,*), B(LDB,*) CHARACTER(1) SIDE, UPLO, TRANSA, DIAG
The routine may be called by its BLAS name ztrmm.

None.

None.

## 5  Parameters

1:     SIDE – CHARACTER(1)Input
On entry: specifies whether $B$ is operated on from the left or the right.
${\mathbf{SIDE}}=\text{'L'}$
$B$ is pre-multiplied from the left.
${\mathbf{SIDE}}=\text{'R'}$
$B$ is post-multiplied from the right.
Constraint: ${\mathbf{SIDE}}=\text{'L'}$ or $\text{'R'}$.
2:     UPLO – CHARACTER(1)Input
On entry: specifies whether $A$ is upper or lower triangular.
${\mathbf{UPLO}}=\text{'U'}$
$A$ is upper triangular.
${\mathbf{UPLO}}=\text{'L'}$
$A$ is lower triangular.
Constraint: ${\mathbf{UPLO}}=\text{'U'}$ or $\text{'L'}$.
3:     TRANSA – CHARACTER(1)Input
On entry: specifies whether the operation involves $A$, ${A}^{\mathrm{T}}$ or ${A}^{\mathrm{H}}$.
${\mathbf{TRANSA}}=\text{'N'}$
The operation involves $A$.
${\mathbf{TRANSA}}=\text{'T'}$
The operation involves ${A}^{\mathrm{T}}$.
${\mathbf{TRANSA}}=\text{'C'}$
The operation involves ${A}^{\mathrm{H}}$.
Constraint: ${\mathbf{TRANSA}}=\text{'N'}$, $\text{'T'}$ or $\text{'C'}$.
4:     DIAG – CHARACTER(1)Input
On entry: specifies whether $A$ has nonunit or unit diagonal elements.
${\mathbf{DIAG}}=\text{'N'}$
The diagonal elements are stored explicitly.
${\mathbf{DIAG}}=\text{'U'}$
The diagonal elements are assumed to be $1$, and are not referenced.
Constraint: ${\mathbf{DIAG}}=\text{'N'}$ or $\text{'U'}$.
5:     M – INTEGERInput
On entry: $m$, the number of rows of the matrix $B$; the order of $A$ if ${\mathbf{SIDE}}=\text{'L'}$.
Constraint: ${\mathbf{M}}\ge 0$.
6:     N – INTEGERInput
On entry: $n$, the number of columns of the matrix $B$; the order of $A$ if ${\mathbf{SIDE}}=\text{'R'}$.
Constraint: ${\mathbf{N}}\ge 0$.
7:     ALPHA – COMPLEX (KIND=nag_wp)Input
On entry: the scalar $\alpha$.
8:     A(LDA,$*$) – COMPLEX (KIND=nag_wp) arrayInput
Note: the second dimension of the array A must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$ if ${\mathbf{SIDE}}=\text{'L'}$ and at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$ if ${\mathbf{SIDE}}=\text{'R'}$.
On entry: the triangular matrix $A$; $A$ is $m$ by $m$ if ${\mathbf{SIDE}}=\text{'L'}$, or $n$ by $n$ if ${\mathbf{SIDE}}=\text{'R'}$.
• If ${\mathbf{UPLO}}=\text{'U'}$, $A$ is upper triangular and the elements of the array below the diagonal are not referenced.
• If ${\mathbf{UPLO}}=\text{'L'}$, $A$ is lower triangular and the elements of the array above the diagonal are not referenced.
• If ${\mathbf{DIAG}}=\text{'U'}$, the diagonal elements of $A$ are assumed to be $1$, and are not referenced.
9:     LDA – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F06ZFF (ZTRMM) is called.
Constraints:
• if ${\mathbf{SIDE}}=\text{'L'}$, ${\mathbf{LDA}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$;
• if ${\mathbf{SIDE}}=\text{'R'}$, ${\mathbf{LDA}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
10:   B(LDB,$*$) – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array B must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
On entry: the $m$ by $n$ matrix $B$.
If ${\mathbf{ALPHA}}=0$, B need not be set.
On exit: the updated matrix $B$.
11:   LDB – INTEGERInput
On entry: the first dimension of the array B as declared in the (sub)program from which F06ZFF (ZTRMM) is called.
Constraint: ${\mathbf{LDB}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$.

None.

Not applicable.