NAG FL Interface
f06yaf (dgemm)

1 Purpose

f06yaf 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

Fortran Interface
Subroutine f06yaf ( transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
Integer, Intent (In) :: m, n, k, lda, ldb, ldc
Real (Kind=nag_wp), Intent (In) :: alpha, a(lda,*), b(ldb,*), beta
Real (Kind=nag_wp), Intent (Inout) :: c(ldc,*)
Character (1), Intent (In) :: transa, transb
C Header Interface
#include <nag.h>
void  f06yaf_ (const char *transa, const char *transb, const Integer *m, const Integer *n, const Integer *k, const double *alpha, const double a[], const Integer *lda, const double b[], const Integer *ldb, const double *beta, double c[], const Integer *ldc, const Charlen length_transa, const Charlen length_transb)
The routine may be called by the names f06yaf, nagf_blas_dgemm or its BLAS name dgemm.

3 Description

None.

4 References

None.

5 Arguments

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 Integer Input
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 Integer Input
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 Integer Input
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: alda* Real (Kind=nag_wp) array Input
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 Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f06yaf is called.
Constraints:
  • if transa='N', lda max1,m ;
  • if transa='T' or 'C', lda max1,k .
9: bldb* Real (Kind=nag_wp) array Input
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 Integer Input
On entry: the first dimension of the array b as declared in the (sub)program from which f06yaf 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: cldc* Real (Kind=nag_wp) array Input/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.0, c need not be set.
On exit: the updated matrix C.
13: ldc Integer Input
On entry: the first dimension of the array c as declared in the (sub)program from which f06yaf is called.
Constraint: ldc max1,m .

6 Error Indicators and Warnings

None.

7 Accuracy

Not applicable.

8 Parallelism and Performance

f06yaf 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.