Developer Reference

  • 2021.2
  • 03/26/2021
  • Public Content
  • Download as PDF
Contents

cblas_?gemv_batch

Computes groups of matrix-vector product with general matrices.

Syntax

void
cblas_sgemv_batch
(
const
CBLAS_LAYOUT
layout
,
const
CBLAS_TRANSPOSE
*trans_array
,
const
MKL_INT *
m_array
,
const
MKL_INT *
n_array
,
const
float
*alpha_array
,
const
float
**a_array
,
const
MKL_INT
*lda_array
,
const
float
**x_array
,
const
MKL_INT
*incx_array
,
const
float *
beta_array
,
float
**y_array
,
const
MKL_INT
*incy_array
,
const
MKL_INT
group_count
,
const MKL_INT
*group_size
);
void
cblas_dgemv_batch
(
const
CBLAS_LAYOUT
layout
,
const
CBLAS_TRANSPOSE
*trans_array
,
const
MKL_INT *
m_array
,
const
MKL_INT *
n_array
,
const
double
*alpha_array
,
const
double
**a_array
,
const
MKL_INT
*lda_array
,
const
double
**x_array
,
const
MKL_INT
*incx_array
,
const
double *
beta_array
,
double
**y_array
,
const
MKL_INT
*incy_array
,
const
MKL_INT
group_count
,
const MKL_INT
*group_size
);
void
cblas_cgemv_batch
(
const
CBLAS_LAYOUT
layout
,
const
CBLAS_TRANSPOSE
*trans_array
,
const
MKL_INT *
m_array
,
const
MKL_INT *
n_array
,
const
void
*alpha_array
,
const
void
**a_array
,
const
MKL_INT
*lda_array
,
const
void
**x_array
,
const
MKL_INT
*incx_array
,
const
void *
beta_array
,
void
**y_array
,
const
MKL_INT
*incy_array
,
const
MKL_INT
group_count
,
const MKL_INT
*group_size
);
void
cblas_zgemv_batch
(
const
CBLAS_LAYOUT
layout
,
const
CBLAS_TRANSPOSE
*trans_array
,
const
MKL_INT *
m_array
,
const
MKL_INT *
n_array
,
const
void
*alpha_array
,
const
void
**a_array
,
const
MKL_INT
*lda_array
,
const
void
**x_array
,
const
MKL_INT
*incx_array
,
const
void *
beta_array
,
void
**y_array
,
const
MKL_INT
*incy_array
,
const
MKL_INT
group_count
,
const MKL_INT
*group_size
);
Include Files
  • mkl.h
Description
The
cblas_?gemv_batch
routines perform a series of matrix-vector product added to a scaled vector. They are similar to the
cblas_?gemv
routine counterparts, but the
cblas_?gemv_batch
routines perform matrix-vector operations with groups 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 trans, m, n, alpha, lda, incx, beta, incy and group_size at position i in trans_array, m_array, n_array, alpha_array, lda_array, incx_array, beta_array, incy_array and group_size_array for j = 0 … group_size – 1 a is a matrix of size mxn at position idx in a_array x and y are vectors of size m or n depending on trans, at position idx in x_array and y_array y := alpha * op(a) * x + beta * y idx := idx + 1 end for end for
The number of entries in
a_array
,
x_array
, and
y_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).
trans_array
Array of size
group_count
. For the group
i
,
trans
i
=
trans_array
[i] specifies the transposition operation applied to
A
.
if
trans
=
CblasNoTrans
, then op(A) = A;
if
trans
=
CblasTrans
, then op(A) = A';
if
trans
=
CblasConjTrans
, then op(A) = conjg(A').
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
.
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
.
alpha_array
Array of size
group_count
. For the group
i
,
alpha
i
=
alpha_array
[i] is the scalar
alpha
.
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
A
matrix is not transposed 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
.
beta_array
Array of size
group_count
. For the group
i
,
beta
i
=
beta_array
[i] is the scalar
beta
.
y_array
Array of size
total_batch_count
of pointers used to store
y
vectors. The array allocated for the
y
vectors of the group
i
must be of size at least (1 +
len
i
– 1)*abs(
incy
i
)) where
len
i
is
m
i
if the
A
matrix is not transposed or
n
i
otherwise.
incy_array
Array of size
group_count
. For the group
i
,
incy
i
=
incy_array
[i] is the stride of vector
y
.
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_count
must be at least 0.
Output Parameters
y_array
Array of pointers holding the
total_batch_count
updated vector
y
.

Product and Performance Information

1

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