nag_dtfsm (f16ylc) (PDF version)
f16 Chapter Contents
f16 Chapter Introduction
NAG Library Manual

NAG Library Function Document

nag_dtfsm (f16ylc)

 Contents

    1  Purpose
    7  Accuracy

1  Purpose

nag_dtfsm (f16ylc) 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 stored in Rectangular Full Packed (RFP) format, B is an m by n real matrix, and α is a real scalar. A-T  denotes AT-1  or equivalently A-1T .
No test for singularity or near-singularity of A is included in this function. Such tests must be performed before calling this function.

2  Specification

#include <nag.h>
#include <nagf16.h>
void  nag_dtfsm (Nag_OrderType order, Nag_RFP_Store transr, Nag_SideType side, Nag_UploType uplo, Nag_TransType trans, Nag_DiagType diag, Integer m, Integer n, double alpha, const double ar[], double b[], Integer pdb, NagError *fail)

3  Description

nag_dtfsm (f16ylc) solves (for X) a triangular linear system of one of the forms
AX=αB , ATX=αB , XA=αB   or XAT=αB ,  
where A is a real triangular matrix stored in RFP format, B, X are m by n real matrices, and α is a real scalar. The RFP storage format is described in Section 3.3.3 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  Arguments

1:     order Nag_OrderTypeInput
On entry: the order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by order=Nag_RowMajor. See Section 3.2.1.3 in the Essential Introduction for a more detailed explanation of the use of this argument.
Constraint: order=Nag_RowMajor or Nag_ColMajor.
2:     transr Nag_RFP_StoreInput
On entry: specifies whether the RFP representation of A is normal or transposed.
transr=Nag_RFP_Normal
The matrix A is stored in normal RFP format.
transr=Nag_RFP_Trans
The matrix A is stored in transposed RFP format.
Constraint: transr=Nag_RFP_Normal or Nag_RFP_Trans.
3:     side Nag_SideTypeInput
On entry: specifies whether B is operated on from the left or the right, or similarly whether A (or its transpose) appears to the left or right of the solution matrix in the linear system to be solved.
side=Nag_LeftSide
B is pre-multiplied from the left. The system to be solved has the form AX=αB or ATX=αB.
side=Nag_RightSide
B is post-multiplied from the right. The system to be solved has the form XA=αB or XAT=αB.
Constraint: side=Nag_LeftSide or Nag_RightSide.
4:     uplo Nag_UploTypeInput
On entry: specifies whether A is upper or lower triangular.
uplo=Nag_Upper
A is upper triangular.
uplo=Nag_Lower
A is lower triangular.
Constraint: uplo=Nag_Upper or Nag_Lower.
5:     trans Nag_TransTypeInput
On entry: specifies whether the operation involves A-1 or A-T, i.e., whether or not A is transposed in the linear system to be solved.
trans=Nag_NoTrans
The operation involves A-1, i.e., A is not transposed.
trans=Nag_Trans
The operation involves A-T, i.e., A is transposed.
Constraint: trans=Nag_NoTrans or Nag_Trans.
6:     diag Nag_DiagTypeInput
On entry: specifies whether A has nonunit or unit diagonal elements.
diag=Nag_NonUnitDiag
The diagonal elements of A are stored explicitly.
diag=Nag_UnitDiag
The diagonal elements of A are assumed to be 1, the corresponding elements of ar are not referenced.
Constraint: diag=Nag_NonUnitDiag or Nag_UnitDiag.
7:     m IntegerInput
On entry: m, the number of rows of the matrix B.
Constraint: m0.
8:     n IntegerInput
On entry: n, the number of columns of the matrix B.
Constraint: n0.
9:     alpha doubleInput
On entry: the scalar α.
10:   ar[dim] const doubleInput
Note: the dimension, dim, of the array ar must be at least
  • max1,m×m+1/2 when side=Nag_LeftSide;
  • max1,n×n+1/2 when side=Nag_RightSide.
On entry: the m by m triangular matrix A if side=Nag_LeftSide or the n by n triangular matrix A if side=Nag_RightSide, stored in RFP format (as specified by transr). The storage format is described in detail in Section 3.3.3 in the f07 Chapter Introduction. If alpha=0.0, ar is not referenced.
11:   b[dim] doubleInput/Output
Note: the dimension, dim, of the array b must be at least
  • max1,pdb×n when order=Nag_ColMajor;
  • max1,m×pdb when order=Nag_RowMajor.
On entry: the m by n matrix B.
If alpha=0, b need not be set.
On exit: the updated matrix B, or similarly the solution matrix X.
If order=Nag_ColMajor, Bij is stored in b[j-1×pdb+i-1].
If order=Nag_RowMajor, Bij is stored in b[i-1×pdb+j-1].
12:   pdb IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array b.
Constraints:
  • if order=Nag_ColMajor, pdbmax1,m;
  • if order=Nag_RowMajor, pdbmax1,n.
13:   fail NagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).

6  Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.2.1.2 in the Essential Introduction for further information.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_INT
On entry, m=value.
Constraint: m0.
On entry, n=value.
Constraint: n0.
NE_INT_2
On entry, pdb=value, m=value.
Constraint: pdbmax1,m.
On entry, pdb=value and n=value.
Constraint: pdbmax1,n.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
An unexpected error has been triggered by this function. Please contact NAG.
See Section 3.6.6 in the Essential Introduction for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 3.6.5 in the Essential Introduction for further information.

7  Accuracy

Not applicable.

8  Parallelism and Performance

nag_dtfsm (f16ylc) is not threaded by NAG in any implementation.
nag_dtfsm (f16ylc) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9  Further Comments

None.

10  Example

This example reads in the lower triangular part of a symmetric matrix A which it converts to RFP format. It also reads in α and a 6 by 4 matrix B and then performs the matrix-matrix operation BαA-1B.

10.1  Program Text

Program Text (f16ylce.c)

10.2  Program Data

Program Data (f16ylce.d)

10.3  Program Results

Program Results (f16ylce.r)


nag_dtfsm (f16ylc) (PDF version)
f16 Chapter Contents
f16 Chapter Introduction
NAG Library Manual

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