Developer Reference

  • 2021.1
  • 12/04/2020
  • Public Content
Contents

cblas_?axpy_batch

Computes a group of vector-scalar products added to a vector.

Syntax

void
cblas_saxpy_batch
(
const
MKL_INT
*n_array
,
const
float
*alpha_array
,
const
float
**x_array
,
const
MKL_INT
*incx_array
,
float
**y_array
,
const
MKL_INT
*incy_array
,
const MKL_INT
group_count
,
const MKL_INT
*group_size_array
);
void
cblas_daxpy_batch
(
const
MKL_INT
*n_array
,
const
double
*alpha_array
,
const
double
**x_array
,
const
MKL_INT
*incx_array
,
double
**y_array
,
const
MKL_INT
*incy_array
,
const MKL_INT
group_count
,
const MKL_INT
*group_size_array
);
void
cblas_caxpy_batch
(
const
MKL_INT
*n_array
,
const
void
*alpha_array
,
const
void
**x_array
,
const
MKL_INT
*incx_array
,
void
**y_array
,
const
MKL_INT
*incy_array
,
const MKL_INT
group_count
,
const MKL_INT
*group_size_array
);
void
cblas_zaxpy_batch
(
const
MKL_INT
*n_array
,
const
void
*alpha_array
,
const
void
**x_array
,
const
MKL_INT
*incx_array
,
void
**y_array
,
const
MKL_INT
*incy_array
,
const MKL_INT
group_count
,
const MKL_INT
*group_size_array
);
Description
The
cblas_?axpy_batch
routines perform a series of scalar-vector product added to a vector. They are similar to the
cblas_?axpy
routine counterparts, but the
cblas_?axpy_batch
routines perform vector operations with a group of vectors. The groups contain vectors with the same parameters.
The operation is defined as
idx = 0 for i = 0 … group_count – 1 n, alpha, incx, incy and group_size at position i in n_array, alpha_array, incx_array, incy_array and group_size_array for j = 0 … group_size – 1 x and y are vectors of size n at position idx in x_array and y_array y := alpha * x + y idx := idx + 1 end for end for
The number of entries in
x_array
, and
y_array
is
total_batch_count
= the sum of all of the
group_size
entries.
Input Parameters
n_array
Array of size
group_count
. For the group
i
,
n
i
=
n_array[i]
is the number of elements in vectors
x
and
y
.
alpha_array
Array of size
group_count
. For the group
i
,
alpha
i
=
alpha_array[i]
is the scalar
alpha
.
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 + (
n
i
– 1)*abs(
incx
i
)). See Matrix and Vector Storage for more details.
incx_array
Array of size
group_count
. For the group
i
,
incx
i
=
incx_array[i]
is the stride of vector
x
.
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 + (
n
i
– 1)*abs(
incy
i
)). See Matrix and Vector Storage for more details.
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
Array of size
group_count
. The element
group_size_array[i]
is the number of vector in the group
i
. Each element in
group_size_array
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.