NAG Library Routine Document

f06zaf (zgemm)

1
Purpose

f06zaf (zgemm) 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 matrices, and α and β are complex scalars; C is always m by n.

2
Specification

Fortran Interface
Subroutine f06zaf ( transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
Integer, Intent (In):: m, n, k, lda, ldb, ldc
Complex (Kind=nag_wp), Intent (In):: alpha, a(lda,*), b(ldb,*), beta
Complex (Kind=nag_wp), Intent (Inout):: c(ldc,*)
Character (1), Intent (In):: transa, transb
C Header Interface
#include <nagmk26.h>
void  f06zaf_ (const char *transa, const char *transb, const Integer *m, const Integer *n, const Integer *k, const Complex *alpha, const Complex a[], const Integer *lda, const Complex b[], const Integer *ldb, const Complex *beta, Complex c[], const Integer *ldc, const Charlen length_transa, const Charlen length_transb)
The routine may be called by its BLAS name zgemm.

3
Description

None.

4
References

None.

5
Arguments

1:     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'.
2:     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'.
3:     m – IntegerInput
On entry: m, the number of rows of the matrix C; the number of rows of A if transa='N', or the number of columns of A if transa='T' or 'C'.
Constraint: m0.
4:     n – IntegerInput
On entry: n, the number of columns of the matrix C; the number of columns of B if transb='N', or the number of rows of B if transb='T' or 'C'.
Constraint: n0.
5:     k – IntegerInput
On entry: k, the number of columns of A if transa='N', or the number of rows of A if transa='T' or 'C'; the number of rows of B if transb='N', or the number of columns of B if transb='T' or 'C'.
Constraint: k0.
6:     alpha – Complex (Kind=nag_wp)Input
On entry: the scalar α.
7:     alda* – Complex (Kind=nag_wp) arrayInput
Note: the second dimension of the array a must be at least max1,k if transa='N' and at least max1,m if transa='T' or 'C'.
On entry: the matrix A; A is m by k if transa='N', or k by m if transa='T' or 'C'.
8:     lda – IntegerInput
On entry: the first dimension of the array a as declared in the (sub)program from which f06zaf (zgemm) is called.
Constraints:
  • if transa='N', lda max1,m ;
  • if transa='T' or 'C', lda max1,k .
9:     bldb* – Complex (Kind=nag_wp) arrayInput
Note: the second dimension of the array b must be at least max1,n if transb='N' and at least max1,k if transb='T' or 'C'.
On entry: the matrix B; B is k by n if transb='N', or n by k if transb='T' or 'C'.
10:   ldb – IntegerInput
On entry: the first dimension of the array b as declared in the (sub)program from which f06zaf (zgemm) is called.
Constraints:
  • if transb='N', ldb max1,k ;
  • if transb='T' or 'C', ldb max1,n .
11:   beta – Complex (Kind=nag_wp)Input
On entry: the scalar β.
12:   cldc* – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array c must be at least max1,n.
On entry: the m by n matrix C.
If beta=0, c need not be set.
On exit: the updated matrix C.
13:   ldc – IntegerInput
On entry: the first dimension of the array c as declared in the (sub)program from which f06zaf (zgemm) is called.
Constraint: ldc max1,m .

6
Error Indicators and Warnings

None.

7
Accuracy

Not applicable.

8
Parallelism and Performance

f06zaf (zgemm) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
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

None.