NAG Library Routine Document

1Purpose

f01vlf (dtfttp) copies a real triangular matrix, stored in a Rectangular Full Packed (RFP) format array, to a standard packed format array.

2Specification

Fortran Interface
 Subroutine f01vlf ( uplo, n, ar, ap, info)
 Integer, Intent (In) :: n Integer, Intent (Out) :: info Real (Kind=nag_wp), Intent (In) :: ar(n*(n+1)/2) Real (Kind=nag_wp), Intent (Out) :: ap(n*(n+1)/2) Character (1), Intent (In) :: transr, uplo
#include nagmk26.h
 void f01vlf_ (const char *transr, const char *uplo, const Integer *n, const double ar[], double ap[], Integer *info, const Charlen length_transr, const Charlen length_uplo)
The routine may be called by its LAPACK name dtfttp.

3Description

f01vlf (dtfttp) packs a real $n$ by $n$ triangular matrix $A$, stored in RFP format, to packed format. This routine is intended for possible use in conjunction with routines from Chapters F06, F07 and F16 where some routines that use triangular matrices store them in RFP format. The RFP storage format is described in Section 3.3.3 in the F07 Chapter Introduction and the packed storage format is described in Section 3.3.2 in the F07 Chapter Introduction.

4References

Gustavson F G, Waśniewski J, Dongarra J J and Langou J (2010) Rectangular full packed format for Cholesky's algorithm: factorization, solution, and inversion ACM Trans. Math. Software 37, 2

5Arguments

1:     $\mathbf{transr}$ – Character(1)Input
On entry: specifies whether the normal RFP representation of $A$ or its transpose is stored.
${\mathbf{transr}}=\text{'N'}$
The RFP representation of the matrix $A$ is stored.
${\mathbf{transr}}=\text{'T'}$
The transpose of the RFP representation of the matrix $A$ is stored.
Constraint: ${\mathbf{transr}}=\text{'N'}$ or $\text{'T'}$.
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{n}$ – IntegerInput
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{n}}\ge 0$.
4:     $\mathbf{ar}\left({\mathbf{n}}×\left({\mathbf{n}}+1\right)/2\right)$ – Real (Kind=nag_wp) arrayInput
On entry: the upper or lower $n$ by $n$ triangular matrix $A$ (as specified by uplo) in either normal or transposed RFP format (as specified by transr). The storage format is described in Section 3.3.3 in the F07 Chapter Introduction.
5:     $\mathbf{ap}\left({\mathbf{n}}×\left({\mathbf{n}}+1\right)/2\right)$ – Real (Kind=nag_wp) arrayOutput
On exit: the $n$ by $n$ triangular matrix $A$, packed by columns.
More precisely,
• if ${\mathbf{uplo}}=\text{'U'}$, the upper triangle of $A$ is 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$ is stored with element ${A}_{ij}$ in ${\mathbf{ap}}\left(i+\left(2n-j\right)\left(j-1\right)/2\right)$ for $i\ge j$.
6:     $\mathbf{info}$ – IntegerOutput
On exit: ${\mathbf{info}}=0$ unless the routine detects an error (see Section 6).

6Error Indicators and Warnings

$-999<{\mathbf{info}}<0$
If ${\mathbf{info}}=-i$, argument $i$ had an illegal value. An explanatory message is output, and execution of the program is terminated.
${\mathbf{info}}=-999$
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.

Not applicable.

8Parallelism and Performance

f01vlf (dtfttp) is not threaded in any implementation.

None.

10Example

This example reads in a triangular matrix in RFP format and copies it to packed format.

10.1Program Text

Program Text (f01vlfe.f90)

10.2Program Data

Program Data (f01vlfe.d)

10.3Program Results

Program Results (f01vlfe.r)

© The Numerical Algorithms Group Ltd, Oxford, UK. 2017