# NAG FL Interfacef06yjf (dtrsm)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f06yjf performs one of the matrix-matrix operations
 $B←αA-1B, B←αA-TB, B←αBA-1 or B←αBA-T,$
where $A$ is a real triangular matrix, $B$ is an $m×n$ real matrix, and $\alpha$ is a real scalar. ${A}^{-\mathrm{T}}$ denotes ${\left({A}^{\mathrm{T}}\right)}^{-1}$ or equivalently ${\left({A}^{-1}\right)}^{\mathrm{T}}$.
No test for singularity or near-singularity of $A$ is included in this routine. Such tests must be performed before calling this routine.

## 2Specification

Fortran Interface
 Subroutine f06yjf ( side, uplo, diag, m, n, a, lda, b, ldb)
 Integer, Intent (In) :: m, n, lda, ldb Real (Kind=nag_wp), Intent (In) :: alpha, a(lda,*) Real (Kind=nag_wp), Intent (Inout) :: b(ldb,*) Character (1), Intent (In) :: side, uplo, transa, diag
#include <nag.h>
 void f06yjf_ (const char *side, const char *uplo, const char *transa, const char *diag, const Integer *m, const Integer *n, const double *alpha, const double a[], const Integer *lda, double b[], const Integer *ldb, const Charlen length_side, const Charlen length_uplo, const Charlen length_transa, const Charlen length_diag)
The routine may be called by the names f06yjf, nagf_blas_dtrsm or its BLAS name dtrsm.

None.

None.

## 5Arguments

1: $\mathbf{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: $\mathbf{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: $\mathbf{transa}$Character(1) Input
On entry: specifies whether the operation involves ${A}^{-1}$ or ${A}^{-\mathrm{T}}$.
${\mathbf{transa}}=\text{'N'}$
The operation involves ${A}^{-1}$.
${\mathbf{transa}}=\text{'T'}$ or $\text{'C'}$
The operation involves ${A}^{-\mathrm{T}}$.
Constraint: ${\mathbf{transa}}=\text{'N'}$, $\text{'T'}$ or $\text{'C'}$.
4: $\mathbf{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: $\mathbf{m}$Integer Input
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: $\mathbf{n}$Integer Input
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: $\mathbf{alpha}$Real (Kind=nag_wp) Input
On entry: the scalar $\alpha$.
8: $\mathbf{a}\left({\mathbf{lda}},*\right)$Real (Kind=nag_wp) array Input
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×m$ if ${\mathbf{side}}=\text{'L'}$, or $n×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: $\mathbf{lda}$Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f06yjf 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: $\mathbf{b}\left({\mathbf{ldb}},*\right)$Real (Kind=nag_wp) array Input/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×n$ matrix $B$.
If ${\mathbf{alpha}}=0$, b need not be set.
On exit: the updated matrix $B$.
11: $\mathbf{ldb}$Integer Input
On entry: the first dimension of the array b as declared in the (sub)program from which f06yjf is called.
Constraint: ${\mathbf{ldb}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.

None.

Not applicable.

## 8Parallelism and Performance

f06yjf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.