F01VLF (DTFTTP) (PDF version)
F01 Chapter Contents
F01 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF01VLF (DTFTTP)

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

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

## 2  Specification

 SUBROUTINE F01VLF ( TRANSR, UPLO, N, AR, AP, INFO)
 INTEGER N, INFO REAL (KIND=nag_wp) AR(N*(N+1)/2), AP(N*(N+1)/2) CHARACTER(1) TRANSR, UPLO
The routine may be called by its LAPACK name dtfttp.

## 3  Description

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.

## 4  References

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

## 5  Parameters

1:     $\mathrm{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:     $\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{N}$ – INTEGERInput
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{N}}\ge 0$.
4:     $\mathrm{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:     $\mathrm{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:     $\mathrm{INFO}$ – INTEGEROutput
On exit: ${\mathbf{INFO}}=0$ unless the routine detects an error (see Section 6).

## 6  Error 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.

Not applicable.

Not applicable.

None.

## 10  Example

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

### 10.1  Program Text

Program Text (f01vlfe.f90)

### 10.2  Program Data

Program Data (f01vlfe.d)

### 10.3  Program Results

Program Results (f01vlfe.r)

F01VLF (DTFTTP) (PDF version)
F01 Chapter Contents
F01 Chapter Introduction
NAG Library Manual