NAG CL Interface
f16zlc (ztfsm)

Settings help

CL Name Style:


1 Purpose

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×n complex matrix, and α is a complex scalar. A-H denotes (AH)-1 or equivalently (A-1)H .
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>
void  f16zlc (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)
The function may be called by the names: f16zlc, nag_blast_ztfsm or nag_ztfsm.

3 Description

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×n complex matrices, and α is a complex scalar. The RFP storage format is described in Section 3.4.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_OrderType Input
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.1.3 in the Introduction to the NAG Library CL Interface for a more detailed explanation of the use of this argument.
Constraint: order=Nag_RowMajor or Nag_ColMajor.
2: transr Nag_RFP_Store Input
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_SideType Input
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_UploType Input
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_TransType Input
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_DiagType Input
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 Integer Input
On entry: m, the number of rows of the matrix B.
Constraint: m0.
8: n Integer Input
On entry: n, the number of columns of the matrix B.
Constraint: n0.
9: alpha Complex Input
On entry: the scalar α.
10: ar[dim] const Complex Input
Note: the dimension, dim, of the array ar must be at least
  • max(1,m×(m+1)/2) when side=Nag_LeftSide;
  • max(1,n×(n+1)/2) when side=Nag_RightSide.
On entry: the m×m triangular matrix A if side=Nag_LeftSide or the n×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.4.3 in the F07 Chapter Introduction. If alpha=0.0, ar is not referenced.
11: b[dim] Complex Input/Output
Note: the dimension, dim, of the array b must be at least
  • max(1,pdb×n) when order=Nag_ColMajor;
  • max(1,m×pdb) when order=Nag_RowMajor.
On entry: the m×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 Integer Input
On entry: the stride separating row or column elements (depending on the value of order) in the array b.
Constraints:
  • if order=Nag_ColMajor, pdbmax(1,m);
  • if order=Nag_RowMajor, pdbmax(1,n).
13: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6 Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface 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: pdbmax(1,m).
On entry, pdb=value and n=value.
Constraint: pdbmax(1,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.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
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×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)