NAG FL Interface
f01dtf (complex_​tri_​matmul)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f01dtf performs one of the matrix-matrix operations
CαAB+βC, CαATB+βC, CαAHB+βC, CαABT+βC, CαATBT+βC, CαAHBT+βC, CαABH+βC, CαATBH+βC  or CαAHBH+βC,  
where A, B, and C are complex triangular matrices, and α and β are complex scalars.

2 Specification

Fortran Interface
Subroutine f01dtf ( uplo, transa, transb, n, alpha, a, lda, b, ldb, beta, c, ldc, ifail)
Integer, Intent (In) :: n, lda, ldb, ldc
Integer, Intent (Inout) :: ifail
Complex (Kind=nag_wp), Intent (In) :: alpha, a(lda,*), b(ldb,*), beta
Complex (Kind=nag_wp), Intent (Inout) :: c(ldc,*)
Character (1), Intent (In) :: uplo, transa, transb
C Header Interface
#include <nag.h>
void  f01dtf_ (const char *uplo, const char *transa, const char *transb, const Integer *n, const Complex *alpha, const Complex a[], const Integer *lda, const Complex b[], const Integer *ldb, const Complex *beta, Complex c[], const Integer *ldc, Integer *ifail, const Charlen length_uplo, const Charlen length_transa, const Charlen length_transb)
The routine may be called by the names f01dtf or nagf_matop_complex_tri_matmul.

3 Description

f01dtf computes the triangular matrix product C=αop(A)op(B)+βC, where op(A), op(B), and C are all upper triangular or all lower triangular matrices, and where op(A) is either A, AT, or AH.

4 References

None.

5 Arguments

1: uplo Character(1) Input
On entry: specifies whether C is upper or lower triangular.
uplo='U'
C is upper triangular.
uplo='L'
C is lower triangular.
Constraint: uplo='U' or 'L'.
2: transa Character(1) Input
On entry: specifies whether the operation involves A, AT or AH.
transa='N'
The operation involves A.
transa='T'
The operation involves AT.
transa='C'
The operation involves AH.
Constraint: transa='N', 'T' or 'C'.
3: transb Character(1) Input
On entry: specifies whether the operation involves B, BT or BH.
transb='N'
The operation involves B.
transb='T'
The operation involves BT.
transb='C'
The operation involves BH.
Constraint: transb='N', 'T' or 'C'.
4: n Integer Input
On entry: n, the order of the triangular matrices A, B, and C.
Constraint: n0.
5: alpha Complex (Kind=nag_wp) Input
On entry: the scalar α.
6: a(lda,*) Complex (Kind=nag_wp) array Input
Note: the second dimension of the array a must be at least max(1,n).
On entry: the n×n triangular matrix A.
  • If uplo='U',
    • if transa='N', A is upper triangular and the elements of the array below the diagonal are not referenced;
    • if transa='T' or 'C', A is lower triangular and the elements of the array above the diagonal are not referenced.
  • If uplo='L',
    • if transa='N', A is lower triangular and the elements of the array above the diagonal are not referenced;
    • if transa='T' or 'C', A is upper triangular and the elements of the array below the diagonal are not referenced.
7: lda Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f01dtf is called.
Constraint: ldamax(1,n).
8: b(ldb,*) Complex (Kind=nag_wp) array Input
Note: the second dimension of the array b must be at least max(1,n).
On entry: the n×n triangular matrix B.
  • If uplo='U',
    • if transa='N', B is upper triangular and the elements of the array below the diagonal are not referenced;
    • if transa='T' or 'C', B is lower triangular and the elements of the array above the diagonal are not referenced.
  • If uplo='L',
    • if transa='N', B is lower triangular and the elements of the array above the diagonal are not referenced;
    • if transa='T' or 'C', B is upper triangular and the elements of the array below the diagonal are not referenced.
9: ldb Integer Input
On entry: the first dimension of the array b as declared in the (sub)program from which f01dtf is called.
Constraint: ldbmax(1,n).
10: beta Complex (Kind=nag_wp) Input
On entry: the scalar β.
11: c(ldc,*) Complex (Kind=nag_wp) array Input/Output
Note: the second dimension of the array c must be at least max(1,n).
On entry: the n×n matrix C.
If beta=0, c need not be set.
On exit: the triangular part of C, as specified by uplo, is updated.
12: ldc Integer Input
On entry: the first dimension of the array c as declared in the (sub)program from which f01dtf is called.
Constraint: ldcmax(1,n).
13: ifail Integer Input/Output
On entry: ifail must be set to 0, −1 or 1 to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of 0 causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of −1 means that an error message is printed while a value of 1 means that it is not.
If halting is not appropriate, the value −1 or 1 is recommended. If message printing is undesirable, then the value 1 is recommended. Otherwise, the value 0 is recommended. When the value -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry ifail=0 or −1, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
ifail=1
On entry, uplo=value.
Constraint: uplo='U' or 'L'.
ifail=2
On entry, transa=value.
Constraint: transa='N', 'T' or 'C'.
ifail=3
On entry, transb=value.
Constraint: transb='N', 'T' or 'C'.
ifail=4
On entry, n=value.
Constraint: n0.
ifail=5
On entry, lda=value, n=value.
Constraint: ldamax(1,n).
ifail=6
On entry, ldb=value, n=value.
Constraint: ldbmax(1,n).
ifail=7
On entry, ldc=value, n=value.
Constraint: ldcmax(1,n).
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

f01dtf 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 routine. 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 matrix A, the upper triangular matrix B, and the square matrix C. It then calls f01dtf to compute the triangular matrix product C=αAHB+βC, updating the upper triangular part of C.

10.1 Program Text

Program Text (f01dtfe.f90)

10.2 Program Data

Program Data (f01dtfe.d)

10.3 Program Results

Program Results (f01dtfe.r)