NAG FL Interface
f06yaf (dgemm)

Settings help

FL Name Style:


FL Specification Language:


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×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: a(lda,*) Real (Kind=nag_wp) array Input
Note: the second dimension of the array a must be at least max(1,k) if transa='N' and at least max(1,m) if transa='T' or 'C'.
On entry: the matrix A; A is m×k if transa='N', or k×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 max(1,m) ;
  • if transa='T' or 'C', lda max(1,k) .
9: b(ldb,*) Real (Kind=nag_wp) array Input
Note: the second dimension of the array b must be at least max(1,n) if transb='N' and at least max(1,k) if transb='T' or 'C'.
On entry: the matrix B; B is k×n if transb='N', or n×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 max(1,k) ;
  • if transb='T' or 'C', ldb max(1,n) .
11: beta Real (Kind=nag_wp) Input
On entry: the scalar β.
12: c(ldc,*) Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array c must be at least max(1,n).
On entry: the m×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 max(1,m) .

6 Error Indicators and Warnings

None.

7 Accuracy

Not applicable.

8 Parallelism and Performance

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