NAG FL Interfacef06slf (ztpsv)

1Purpose

f06slf solves a complex triangular system of equations, stored in packed form, with a single right-hand side.

2Specification

Fortran Interface
 Subroutine f06slf ( uplo, diag, n, ap, x, incx)
 Integer, Intent (In) :: n, incx Complex (Kind=nag_wp), Intent (In) :: ap(*) Complex (Kind=nag_wp), Intent (Inout) :: x(*) Character (1), Intent (In) :: uplo, trans, diag
#include <nag.h>
 void f06slf_ (const char *uplo, const char *trans, const char *diag, const Integer *n, const Complex ap[], Complex x[], const Integer *incx, const Charlen length_uplo, const Charlen length_trans, const Charlen length_diag)
The routine may be called by the names f06slf, nagf_blas_ztpsv or its BLAS name ztpsv.

3Description

f06slf performs one of the matrix-vector operations
 $x←A-1x , x←A-Tx or x←A-Hx ,$
where $A$ is an $n$ by $n$ complex triangular matrix, stored in packed form, and $x$ is an $n$-element complex vector. ${A}^{-\mathrm{T}}$ denotes ${\left({A}^{\mathrm{T}}\right)}^{-1}$ or equivalently ${\left({A}^{-1}\right)}^{\mathrm{T}}$; ${A}^{-\mathrm{H}}$ denotes ${\left({A}^{\mathrm{H}}\right)}^{-1}$ or equivalently ${\left({A}^{-1}\right)}^{\mathrm{H}}$.
No test for singularity or near-singularity of $A$ is included in this routine. Such tests must be performed before calling this routine.

None.

5Arguments

1: $\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'}$.
2: $\mathbf{trans}$Character(1) Input
On entry: specifies the operation to be performed.
${\mathbf{trans}}=\text{'N'}$
$x←{A}^{-1}x$.
${\mathbf{trans}}=\text{'T'}$
$x←{A}^{-\mathrm{T}}x$.
${\mathbf{trans}}=\text{'C'}$
$x←{A}^{-\mathrm{H}}x$.
Constraint: ${\mathbf{trans}}=\text{'N'}$, $\text{'T'}$ or $\text{'C'}$.
3: $\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'}$.
4: $\mathbf{n}$Integer Input
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{n}}\ge 0$.
5: $\mathbf{ap}\left(*\right)$Complex (Kind=nag_wp) array Input
Note: the dimension of the array ap must be at least ${\mathbf{n}}×\left({\mathbf{n}}+1\right)/2$.
On entry: the $n$ by $n$ triangular matrix $A$, packed by columns.
More precisely,
• if ${\mathbf{uplo}}=\text{'U'}$, the upper triangle of $A$ must be stored with element ${A}_{ij}$ in ${\mathbf{ap}}\left(i+j\left(j-1\right)/2\right)$ for $i\le j$;
• if ${\mathbf{uplo}}=\text{'L'}$, the lower triangle of $A$ must be stored with element ${A}_{ij}$ in ${\mathbf{ap}}\left(i+\left(2n-j\right)\left(j-1\right)/2\right)$ for $i\ge j$.
If ${\mathbf{diag}}=\text{'U'}$, the diagonal elements of $A$ are assumed to be $1$, and are not referenced; the same storage scheme is used whether ${\mathbf{diag}}=\text{'N'}$ or ‘U’.
6: $\mathbf{x}\left(*\right)$Complex (Kind=nag_wp) array Input/Output
Note: the dimension of the array x must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{n}}-1\right)×\left|{\mathbf{incx}}\right|\right)$.
On entry: the vector $x$.
If ${\mathbf{incx}}>0$, ${x}_{\mathit{i}}$ must be stored in ${\mathbf{x}}\left(1+\left(\mathit{i}–1\right)×{\mathbf{incx}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.
If ${\mathbf{incx}}<0$, ${x}_{\mathit{i}}$ must be stored in ${\mathbf{x}}\left(1–\left({\mathbf{n}}–\mathit{i}\right)×{\mathbf{incx}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.
On exit: the updated vector $x$ stored in the array elements used to supply the original vector $x$.
7: $\mathbf{incx}$Integer Input
On entry: the increment in the subscripts of x between successive elements of $x$.
Constraint: ${\mathbf{incx}}\ne 0$.

None.

Not applicable.

8Parallelism and Performance

f06slf is not threaded in any implementation.