nag_ztfsm (f16zlc) (PDF version)
f16 Chapter Contents
f16 Chapter Introduction
NAG Library Manual

NAG Library Function Document

nag_ztfsm (f16zlc)

 Contents

    1  Purpose
    7  Accuracy

1  Purpose

nag_ztfsm (f16zlc) performs one of the matrix-matrix operations
BαA-1B , BαA-HB , BαBA-1   or BαBA-H ,  
where A is a complex triangular matrix stored in Rectangular Full Packed (RFP) format, B is an m by n complex matrix, and α is a complex scalar. A-H  denotes AH-1  or equivalently A-1H .
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_ztfsm (Nag_OrderType order, Nag_RFP_Store transr, Nag_SideType side, Nag_UploType uplo, Nag_TransType trans, Nag_DiagType diag, Integer m, Integer n, Complex alpha, const Complex ar[], Complex b[], Integer pdb, NagError *fail)

3  Description

nag_ztfsm (f16zlc) solves (for X) a triangular linear system of one of the forms
AX=αB , AHX=αB , XA=αB   or XAH=αB ,  
where A is a complex triangular matrix stored in RFP format, B, X are m by n complex matrices, and α is a complex 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 2.3.1.3 in How to Use the NAG Library and its Documentation 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 normal RFP representation of A or its conjugate transpose is stored.
transr=Nag_RFP_Normal
The matrix A is stored in normal RFP format.
transr=Nag_RFP_ConjTrans
The conjugate transpose of the RFP representation of the matrix A is stored.
Constraint: transr=Nag_RFP_Normal or Nag_RFP_ConjTrans.
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-H, i.e., whether or not A is transpose conjugated in the linear system to be solved.
trans=Nag_NoTrans
The operation involves A-1, i.e., A is not transpose conjugated.
trans=Nag_ConjTrans
The operation involves A-H, i.e., A is transpose conjugated.
Constraint: trans=Nag_NoTrans or Nag_ConjTrans.
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 ComplexInput
On entry: the scalar α.
10:   ar[dim] const ComplexInput
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] ComplexInput/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 2.7 in How to Use the NAG Library and its Documentation).

6  Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 2.3.1.2 in How to Use the NAG Library and its Documentation 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 2.7.6 in How to Use the NAG Library and its Documentation for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 2.7.5 in How to Use the NAG Library and its Documentation for further information.

7  Accuracy

Not applicable.

8  Parallelism and Performance

nag_ztfsm (f16zlc) 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 upper triangular part of a symmetric matrix A which it converts to RFP format. It also reads in α and a 4 by 3 matrix B and then performs the matrix-matrix operation BαA-1B.

10.1  Program Text

Program Text (f16zlce.c)

10.2  Program Data

Program Data (f16zlce.d)

10.3  Program Results

Program Results (f16zlce.r)


nag_ztfsm (f16zlc) (PDF version)
f16 Chapter Contents
f16 Chapter Introduction
NAG Library Manual

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