NAG CPP Interface
nagcpp::blas::dgemm (f06ya)

1 Purpose

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

#include "f06/nagcpp_f06ya.hpp"
template <typename A, typename B, typename C>

void function dgemm(const string transa, const string transb, const double alpha, const A &a, const B &b, const double beta, C &&c, OptionalF06YA opt)
template <typename A, typename B, typename C>

void function dgemm(const string transa, const string transb, const double alpha, const A &a, const B &b, const double beta, C &&c)

3 Description

None.

4 References

None.

5 Arguments

1: transa string 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 string 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: alpha double Input
On entry: the scalar α.
4: a(:,:) double array Input
Note: the first dimension of a is given by: if transa="N": m; if transa="T"  or  transa="C": k; otherwise: 0.
Note: the second dimension of a is given by: if transa="N": k; if transa="T"  or  transa="C": m; otherwise: 0.
On entry: the matrix A; A is m by k if transa='N', or k by m if transa='T' or 'C'.
5: b(:,:) double array Input
Note: the first dimension of b is given by: if transb="N": k; if transb="T"  or  transb="C": n; otherwise: 0.
Note: the second dimension of b is given by: if transb="N": n; if transb="T"  or  transb="C": k; otherwise: 0.
On entry: the matrix B; B is k by n if transb='N', or n by k if transb='T' or 'C'.
6: beta double Input
On entry: the scalar β.
7: c(m,n) double array Input/Output
On entry: the m by n matrix C.
If beta=0.0, c need not be set.
On exit: the updated matrix C.
8: opt OptionalF06YA Input/Output
Optional parameter container, derived from Optional.

5.1Additional Quantities

1: m
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"
2: n
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"
3: k
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"

6 Exceptions and Warnings

All errors and warnings have an associated numeric error code field, errorid, stored either as a member of the thrown exception object (see errorid), or as a member of opt.ifail, depending on how errors and warnings are being handled (see Error Handling for more details).
Raises: ErrorException
errorid=1
On entry, error in parameter transa.
Constraint: transa = "N","T"​ or ​"C".
errorid=2
On entry, error in parameter transb.
Constraint: transb = "N","T"​ or ​"C".
errorid=3
On entry, error in parameter m.
Constraint: m0.
errorid=4
On entry, error in parameter n.
Constraint: n0.
errorid=5
On entry, error in parameter k.
Constraint: k0.
errorid=10601
On entry, argument value must be a value x value array.
Supplied argument has value dimensions.
errorid=10601
On entry, argument value must be a value x value array.
Supplied argument was a value x value array.
errorid=10601
On entry, argument value must be a value x value array.
Not all of the sizes for the supplied array could be ascertained.
errorid=10602
On entry, the raw data component of value is null.
errorid=10603
On entry, unable to ascertain a value for value.
errorid=10604
On entry, the data in value is stored in value Major Order.
The data was expected to be in value Major Order.
errorid=-99
An unexpected error has been triggered by this routine.
errorid=-999
Dynamic memory allocation failed.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Please see the description for the underlying computational routine in this section of the FL Interface documentation.

9 Further Comments

None.

10 Example

Examples of the use of this method may be found in the examples for: real_​nmf_​rcomm.