Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?axpy_batch_strided

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

Syntax

call saxpy_batch_strided(n, alpha, x, incx, stridex, y, incy, stridey, batch_size)

call daxpy_batch_strided(n, alpha, x, incx, stridex, y, incy, stridey, batch_size)

call caxpy_batch_strided(n, alpha, x, incx, stridex, y, incy, stridey, batch_size)

call zaxpy_batch_strided(n, alpha, x, incx, stridex, y, incy, stridey, batch_size)

Include Files

  • mkl.fi

Description

The ?axpy_batch_strided routines perform a series of scalar-vector product added to a vector. They are similar to the ?axpy routine counterparts, but the ?axpy_batch_strided routines perform vector operations with a group of vectors.

All vector x (respectively, y) have the same parameters (size, increments) and are stored at constant stridex (respectively, stridey) from each other. The operation is defined as

For i = 0 … batch_size – 1
    X and Y are vectors at offset i * stridex and i * stridey in x and y
    Y = alpha * X + Y
end for

Input Parameters

n

INTEGER. Number of elements in vectors x and y.

alpha

REAL for saxpy_batch_strided

DOUBLE PRECISION for daxpy_batch_strided

COMPLEX for caxpy_batch_strided

DOUBLE COMPLEX for zaxpy_batch_strided

Specifies the scalar alpha.

x

REAL for saxpy_batch_strided

DOUBLE PRECISION for daxpy_batch_strided

COMPLEX for caxpy_batch_strided

DOUBLE COMPLEX for zaxpy_batch_strided

Array of size at least stridex*batch_size holding the x vectors.

incx

INTEGER. Specifies the increment for the elements of x.

stridex

INTEGER. Stride between two consecutive x vectors; must be at least zero.

y

REAL for saxpy_batch_strided

DOUBLE PRECISION for daxpy_batch_strided

COMPLEX for caxpy_batch_strided

DOUBLE COMPLEX for zaxpy_batch_strided

Array of size at least stridey*batch_size holding the y vectors.

incy

INTEGER. Specifies the increment for the elements of y.

stridey

INTEGER. Stride between two consecutive y vectors; must be at least (1 + (n-1)*abs(incy)).

batch_size

INTEGER. Number of axpy computations to perform and x and y vectors. Must be at least 0.

Output Parameters

y

Array holding the batch_size updated vector y.