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
2
Specification
3
Description
4
References
5
Parameters
6
Error Indicators and Warnings
7
Accuracy
8
Further Comments
9
Example
1 Purpose
F06YAF (DGEMM) performs one of the matrix-matrix operations
C
←
α
A
B
+
β
C
,
C
←
α
A
T
B
+
β
C
,
C
←
α
A
B
T
+
β
C
or
C
←
α
A
T
B
T
+
β
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
A
T
.
TRANSA
=
'N'
The operation involves
A
.
TRANSA
=
'T'
or
'C'
The operation involves
A
T
.
Constraint
:
TRANSA
=
'N'
,
'T'
or
'C'
.
2: TRANSB – CHARACTER(1)
Input
On entry
: specifies whether the operation involves
B
or
B
T
.
TRANSB
=
'N'
The operation involves
B
.
TRANSB
=
'T'
or
'C'
The operation involves
B
T
.
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
:
M
≥
0
.
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
:
N
≥
0
.
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
:
K
≥
0
.
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
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 (DGEMM) 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
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 (DGEMM) 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
by
n
matrix
C
.
If
BETA
=
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 (DGEMM) is called.
Constraint
:
LDC
≥
max
1
,
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