Contents

# cblas_?dgmm_batch_strided

Computes groups of matrix-vector product using general matrices.

## Syntax

Include Files
• mkl.h
Description
The
cblas_?dgmm_batch_strided
routines perform a series of diagonal matrix-matrix product. The diagonal matrices are stored as dense vectors and the operations are performed with group of matrices and vectors.
All matrices
a
and
c
and vector
x
have the same parameters (size, increments) and are stored at constant stride, respectively, given by
stridea
,
stridec
, and
stridex
from each other. The operation is defined as
```for i = 0 … batch_size – 1
A and C are matrices at offset i * stridea in a and i * stridec in c
X is a vector at offset i * stridex in x
C = diag(X) * A or C = A * diag(X)
end for
```
Input Parameters
layout
Specifies whether two-dimensional array storage is row-major (CblasRowMajor) or column-major (CblasColMajor).
left_right
Specifies the position of the diagonal matrix in the matrix product
if
left_right
=
CblasLeft
, then
C
= diag(
X
) *
A
;
if
left_right
=
CblasRight
, then
C
=
A
* diag(
X
).
m
Number of rows of the matrices
A
and
C
. The value of
m
must be at least 0.
n
Number of columns of the matrices
A
and
C
. The value of
n
must be at least 0.
a
Array holding all the input matrix
A
. Must be of size at least
lda
*
k
+
stridea
* (
batch_size
-1) where
k
is
n
if column major layout is used or
m
if row major layout is used.
lda
Specifies the leading dimension of the matrix
A
. It must be positive and at least
m
if column major layout is used or at least
n
if row major layout is used
.
stridea
Stride between two consecutive
A
matrices, must be at least 0.
x
Array holding all the input vector
x
. Must be of size at least (1 + (
len
-1)*abs(
incx
)) +
stridex
* (
batch_size
- 1) where
len
is
n
if the diagonal matrix is on the right of the product or
m
otherwise.
incx
Stride between two consecutive elements of the
x
vectors.
stridex
Stride between two consecutive
x
vectors, must be at least 0.
c
Array holding all the input matrix
C
. Must be of size at least
batch_size
*
stridec
.
ldc
Specifies the leading dimension of the matrix
C
. It must be positive and at least
m
if column major layout is used or at least
n
if row major layout is used
.
stridec
Stride between two consecutive
A
matrices, must be at least
ldc
*
n
if column major layout is used or
ldc
*
m
if row major layout is used
.
batch_size
Number of
dgmm
computations to perform and a
c
matrices and
x
vectors. Must be at least 0.
Output Parameters
c
Array holding the
batch_size
updated matrices
c
.

#### Product and Performance Information

1

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