Developer Reference

Contents

Scales and sums two matrices including in addition to performing out-of-place transposition operations.

Syntax

Include Files
• mkl.h
Description
The
routine scales and adds two matrices, as well as performing out-of-place transposition operations. A transposition operation can be no operation, a transposition, a conjugate transposition, or a conjugation (without transposition). The following out-of-place memory movement is done:
C := alpha*op(A) + beta*op(B)
where the
op(A)
and
op(B)
operations are transpose, conjugate-transpose, conjugate (no transpose), or no transpose, depending on the values of
transa
and
transb
. If no transposition of the source matrices is required,
m
is the number of rows and
n
is the number of columns in the source matrices
A
and
B
. In this case, the output matrix
C
is
m
-by-
n
.
Note that different arrays must not overlap.
Input Parameters
ordering
Ordering of the matrix storage.
If
ordering
=
'R'
or
'r'
, the ordering is row-major.
If
ordering
=
'C'
or
'c'
, the ordering is column-major.
transa
Parameter that specifies the operation type on matrix
A
.
If
transa
=
'N'
or
'n'
,
op(
A
)=
A
and the matrix
A
is assumed unchanged on input.
If
transa
=
'T'
or
't'
, it is assumed that
A
should be transposed.
If
transa
=
'C'
or
'c'
, it is assumed that
A
should be conjugate transposed.
If
transa
=
'R'
or
'r'
, it is assumed that
A
should be conjugated (and not transposed).
If the data is real, then
transa
=
'R'
is the same as
transa
=
'N'
, and
transa
=
'C'
is the same as
transa
=
'T'
.
transb
Parameter that specifies the operation type on matrix
B
.
If
transb
=
'N'
or
'n'
,
op(
B
)=
B
and the matrix
B
is assumed unchanged on input.
If
transb
=
'T'
or
't'
, it is assumed that
B
should be transposed.
If
transb
=
'C'
or
'c'
, it is assumed that
B
should be conjugate transposed.
If
transb
=
'R'
or
'r'
, it is assumed that
B
should be conjugated (and not transposed).
If the data is real, then
transb
=
'R'
is the same as
transb
=
'N'
, and
transb
=
'C'
is the same as
transb
=
'T'
.
m
The number of matrix rows in op(
A
), op(
B
), and
C
.
n
The number of matrix columns in op(
A
), op(
B
), and
C
.
alpha
This parameter scales the input matrix by
alpha
.
a
Array.
lda
Distance between the first elements in adjacent columns (in the case of the column-major order) or rows (in the case of the row-major order) in the source matrix
A
; measured in the number of elements.
For
ordering
=
'C'
or
'c'
: when
transa
=
'N'
,
'n'
,
'R'
, or
'r'
,
lda
must be at least
max(1,
m
)
; otherwise
lda
must be
max(1,
n
)
.
For
ordering
=
'R'
or
'r'
: when
transa
=
'N'
,
'n'
,
'R'
, or
'r'
,
lda
must be at least
max(1,
n
)
; otherwise
lda
must be
max(1,
m
)
.
beta
This parameter scales the input matrix by
beta
.
b
Array.
ldb
Distance between the first elements in adjacent columns (in the case of the column-major order) or rows (in the case of the row-major order) in the source matrix
B
; measured in the number of elements.
For
ordering
=
'C'
or
'c'
: when
transa
=
'N'
,
'n'
,
'R'
, or
'r'
,
ldb
must be at least
max(1,
m
)
; otherwise
ldb
must be
max(1,
n
)
.
For
ordering
=
'R'
or
'r'
: when
transa
=
'N'
,
'n'
,
'R'
, or
'r'
,
ldb
must be at least
max(1,
n
)
; otherwise
ldb
must be
max(1,
m
)
.
ldc
Distance between the first elements in adjacent columns (in the case of the column-major order) or rows (in the case of the row-major order) in the destination matrix
C
; measured in the number of elements.
If
ordering
=
'C'
or
'c'
, then
ldc
must be at least
max(1,
m
)
, otherwise
ldc
must be at least
max(1,
n
)
.
Output Parameters
c
Array.
Interfaces

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.