F06YAF (DGEMM) (PDF version)
F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F06YAF (DGEMM)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy
    9  Example

1  Purpose

F06YAF (DGEMM) performs one of the matrix-matrix operations
CαAB+βC, CαATB+βC, CαABT+βC  or CαATBT+βC,
where A, B and C are real matrices, and α and β are real scalars; C is always m by n.

2  Specification

SUBROUTINE F06YAF ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
INTEGER  M, N, K, LDA, LDB, LDC
REAL (KIND=nag_wp)  ALPHA, A(LDA,*), B(LDB,*), BETA, C(LDC,*)
CHARACTER(1)  TRANSA, TRANSB
The routine may be called by its BLAS name dgemm.

3  Description

None.

4  References

None.

5  Parameters

1:     TRANSA – CHARACTER(1)Input
On entry: specifies whether the operation involves A or AT.
TRANSA='N'
The operation involves A.
TRANSA='T' or 'C'
The operation involves AT.
Constraint: TRANSA='N', 'T' or 'C'.
2:     TRANSB – CHARACTER(1)Input
On entry: specifies whether the operation involves B or BT.
TRANSB='N'
The operation involves B.
TRANSB='T' or 'C'
The operation involves BT.
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 – REAL (KIND=nag_wp)Input
On entry: the scalar α.
7:     A(LDA,*) – REAL (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 F06YAF (DGEMM) is called.
Constraints:
  • if TRANSA='N', LDA max1,M ;
  • if TRANSA='T' or 'C', LDA max1,K .
9:     B(LDB,*) – REAL (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 F06YAF (DGEMM) is called.
Constraints:
  • if TRANSB='N', LDB max1,K ;
  • if TRANSB='T' or 'C', LDB max1,N .
11:   BETA – REAL (KIND=nag_wp)Input
On entry: the scalar β.
12:   C(LDC,*) – REAL (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 F06YAF (DGEMM) is called.
Constraint: LDC max1,M .

6  Error Indicators and Warnings

None.

7  Accuracy

Not applicable.

8  Further Comments

None.

9  Example

None.

F06YAF (DGEMM) (PDF version)
F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

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