F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF06YFF (DTRMM)

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

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

## 2  Specification

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

None.

None.

## 5  Parameters

1:     $\mathrm{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:     $\mathrm{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:     $\mathrm{TRANSA}$ – CHARACTER(1)Input
On entry: specifies whether the operation involves $A$ or ${A}^{\mathrm{T}}$.
${\mathbf{TRANSA}}=\text{'N'}$
The operation involves $A$.
${\mathbf{TRANSA}}=\text{'T'}$ or $\text{'C'}$
The operation involves ${A}^{\mathrm{T}}$.
Constraint: ${\mathbf{TRANSA}}=\text{'N'}$, $\text{'T'}$ or $\text{'C'}$.
4:     $\mathrm{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:     $\mathrm{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:     $\mathrm{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:     $\mathrm{ALPHA}$ – REAL (KIND=nag_wp)Input
On entry: the scalar $\alpha$.
8:     $\mathrm{A}\left({\mathbf{LDA}},*\right)$ – REAL (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:     $\mathrm{LDA}$ – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F06YFF (DTRMM) 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:   $\mathrm{B}\left({\mathbf{LDB}},*\right)$ – REAL (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:   $\mathrm{LDB}$ – INTEGERInput
On entry: the first dimension of the array B as declared in the (sub)program from which F06YFF (DTRMM) is called.
Constraint: ${\mathbf{LDB}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$.

None.

Not applicable.

Not applicable.

None.

None.