Developer Reference

Contents

cblas_?dgmm_batch

Computes groups of matrix-vector product using general matrices.

Syntax

void
cblas_sdgmm_batch
(
const
CBLAS_LAYOUT
layout
,
const
CBLAS_SIDE
*left_right_array
,
const
MKL_INT *
m_array
,
const
MKL_INT *
n_array
,
const
float
**a_array
,
const
MKL_INT
*lda_array
,
const
float
**x_array
,
const
MKL_INT
*incx_array
,
float
**c_array
,
const
MKL_INT
*ldc_array
,
const
MKL_INT
group_count
,
const MKL_INT
*group_size
);
void
cblas_ddgmm_batch
(
const
CBLAS_LAYOUT
layout
,
const
CBLAS_SIDE
*left_right_array
,
const
MKL_INT *
m_array
,
const
MKL_INT *
n_array
,
const
double
**a_array
,
const
MKL_INT
*lda_array
,
const
double
**x_array
,
const
MKL_INT
*incx_array
,
double
**c_array
,
const
MKL_INT
*ldc_array
,
const
MKL_INT
group_count
,
const MKL_INT
*group_size
);
void
cblas_cdgmm_batch
(
const
CBLAS_LAYOUT
layout
,
const
CBLAS_SIDE
*left_right_array
,
const
MKL_INT *
m_array
,
const
MKL_INT *
n_array
,
const
void
**a_array
,
const
MKL_INT
*lda_array
,
const
void
**x_array
,
const
MKL_INT
*incx_array
,
void
**c_array
,
const
MKL_INT
*ldc_array
,
const
MKL_INT
group_count
,
const MKL_INT
*group_size
);
void
cblas_zdgmm_batch
(
const
CBLAS_LAYOUT
layout
,
const
CBLAS_SIDE
*left_right_array
,
const
MKL_INT *
m_array
,
const
MKL_INT *
n_array
,
const
void
**a_array
,
const
MKL_INT
*lda_array
,
const
void
**x_array
,
const
MKL_INT
*incx_array
,
void
**c_array
,
const
MKL_INT
*ldc_array
,
const
MKL_INT
group_count
,
const MKL_INT
*group_size
);
Include Files
  • mkl.h
Description
The
cblas_?dgmm_batch
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. .
Each group contains matrices and vectors with the same parameters (size, increments). The operation is defined as:
idx = 0 For i = 0 … group_count – 1 left_right, m, n, lda, incx, ldc and group_size at position i in left_right_array, m_array, n_array, lda_array, incx_array, ldc_array and group_size_array for j = 0 … group_size – 1 a and c are matrices of size mxn at position idx in a_array and c_array x is a vector of size m or n depending on left_right, at position idx in x_array if (left_right == oneapi::mkl::side::left) c := diag(x) * a else c := a * diag(x) idx := idx + 1 end for end for
The number of entries in
a_array
,
x_array
, and
c_array
is
total_batch_count
= the sum of all of the
group_size
entries.
Input Parameters
layout
Specifies whether two-dimensional array storage is row-major (CblasRowMajor) or column-major (CblasColMajor).
left_right_array
Array of size
group_count
. For the group
i
,
left_right
i
=
left_right_array
[i] specifies the position of the diagonal matrix in the matrix product.
if
left_right
i
=
CblasLeft
, then
C
= diag(X) *
A
.
if
left_right
i
=
CblasRight
, then
C
=
A
* diag(X).
m_array
Array of size
group_count
. For the group
i
,
m
i
=
m_array
[i] is the number of rows of the matrix
A
and
C
.
n_array
Array of size
group_count
. For the group
i
,
n
i
=
n_array
[i] is the number of columns in the matrix
A
and
C
.
a_array
Array of size
total_batch_count
of pointers used to store
A
matrices. The array allocated for the
A
matrices of the group
i
must be of size at least
lda
i
*
n
i
if column major layout is used or at least
lda
i
*
m
i
is row major layout is used
.
lda_array
Array of size
group_count
. For the group
i
,
lda
i
=
lda_array
[i] is the leading dimension of the matrix
A
. It must be positive and at least
m
i
if column major layout is used or at least
n
i
if row major layout is used.
.
x_array
Array of size
total_batch_count
of pointers used to store
x
vectors. The array allocated for the
x
vectors of the group
i
must be of size at least (1 +
len
i
– 1)*abs(
incx
i
)) where
len
i
is
n
i
if the diagonal matrix is on the right of the product or
m
i
otherwise.
incx_array
Array of size
group_count
. For the group
i
,
incx
i
=
incx_array
[i] is the stride of vector
x
.
c_array
Array of size
total_batch_count
of pointers used to store
C
matrices. The array allocated for the
C
matrices of the group
i
must be of size at least
ldc
i
*
n
i
,
if column major layout is used or at least
ldc
i
*
m
i
if row major layout is used.
ldc_array
Array of size
group_count
. For the group
i
,
ldc
i
=
ldc_array
[i] is the leading dimension of the matrix
C
. It must be positive and at least
m
i
if column major layout is used or at least
n
i
if row major layout is used.
.
group_count
Number of groups. Must be at least 0.
group_size
Array of size
group_count
. The element
group_count
[i] is the number of operations in the group
i
. Each element in
group_size
must be at least 0.
Output Parameters
c_array
Array of pointers holding the
total_batch_count
updated matrix
C
.

Product and Performance Information

1

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