Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 7/13/2023
Public

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

Document Table of Contents

?gemv_batch_strided

Computes groups of matrix-vector product with general matrices.

Syntax

call sgemv_batch_strided(trans, m, n, alpha, a, lda, stridea, x, incx, stridex, beta, y, incy, stridey, batch_size)

call dgemv_batch_strided(trans, m, n, alpha, a, lda, stridea, x, incx, stridex, beta, y, incy, stridey, batch_size)

call cgemv_batch_strided(trans, m, n, alpha, a, lda, stridea, x, incx, stridex, beta, y, incy, stridey, batch_size)

call zgemv_batch_strided(trans, m, n, alpha, a, lda, stridea, x, incx, stridex, beta, y, incy, stridey, batch_size)

Include Files

  • mkl.fi

Description

The ?gemv_batch_strided routines perform a series of matrix-vector product added to a scaled vector. They are similar to the ?gemv routine counterparts, but the ?gemv_batch_strided routines perform matrix-vector operations with groups of matrices and vectors.

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

for i = 0 … batch_size – 1
    A is a matrix at offset i * stridea in a
    X and Y are vectors at offset i * stridex and i * stridey in x and y
    Y = alpha * op(A) * X + beta * Y
end for

Input Parameters

trans

CHARACTER*1.

Specifies op(A) the transposition operation applied to the A matrices.

if trans = 'N' or 'n' , then op(A) = A;

if trans = 'T' or 't' , then op(A) = A';

if trans = 'C' or 'c' , then op(A) = conjg(A').

m

INTEGER. Number of rows of the matrices A. The value of m must be at least 0.

n

INTEGER. Number of columns of the matrices A. The value of n must be at least 0.

alpha

REAL for sgemv_batch_strided

DOUBLE PRECISION for dgemv_batch_strided

COMPLEX for cgemv_batch_strided

DOUBLE COMPLEX for zgemv_batch_strided

Specifies the scalar alpha.

a

REAL for sgemv_batch_strided

DOUBLE PRECISION for dgemv_batch_strided

COMPLEX for cgemv_batch_strided

DOUBLE COMPLEX for zgemv_batch_strided

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

INTEGER. Specifies the leading dimension of the matrixA. It must be positive and at least m .

stridea

INTEGER. Stride between two consecutive A matrices. Must be at least 0.

x

REAL for sgemv_batch_strided

DOUBLE PRECISION for dgemv_batch_strided

COMPLEX for cgemv_batch_strided

DOUBLE COMPLEX for zgemv_batch_strided

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 A matrix is not transposed or m otherwise.

incx

INTEGER. Stride between two consecutive elements of the x vectors. Must not be zero.

stridex

INTEGER. Stride between two consecutive x vectors, must be at least 0.

beta

REAL for sgemv_batch_strided

DOUBLE PRECISION for dgemv_batch_strided

COMPLEX for cgemv_batch_strided

DOUBLE COMPLEX for zgemv_batch_strided

Specifies the scalar beta.

y

REAL for sgemv_batch_strided

DOUBLE PRECISION for dgemv_batch_strided

COMPLEX for cgemv_batch_strided

DOUBLE COMPLEX for zgemv_batch_strided

Array holding all the input vectors y. Must be of size at least batch_size * stridey.

incy

INTEGER.

Stride between two consecutive elements of the y vectors. Must not be zero.

stridey

INTEGER.

Stride between two consecutive y vectors, must be at least (1 + (len-1)*abs(incy)) where len is m if the matrix A is non transpose or n otherwise.

batch_size

INTEGER.

Number of gemv computations to perform and a matrices, x and y vectors. Must be at least 0.

Output Parameters

y

Array holding the batch_size updated vector y.