Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 12/16/2022
Public

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

Document Table of Contents

?dgmm_batch_strided

Computes groups of matrix-vector product using general matrices.

Syntax

call sdgmm_batch_strided(left_right, m, n, a, lda, stridea, x, incx, stridex, c, ldc, stridec, batch_size)

call ddgmm_batch_strided(left_right, m, n, a, lda, stridea, x, incx, stridex, c, ldc, stridec, batch_size)

call cdgmm_batch_strided(left_right, m, n, a, lda, stridea, x, incx, stridex, c, ldc, stridec, batch_size)

call zdgmm_batch_strided(left_right, m, n, a, lda, stridea, x, incx, stridex, c, ldc, stridec, batch_size)

Include Files
  • mkl.fi
Description

The ?dgmm_batch_strided 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.

All matrices a and c and vector x have the same parameters (size, increments) and are stored at constant stride, respectively, given by stridea, stridec, and stridex from each other. The operation is defined as

for i = 0 … batch_size – 1
    A and C are matrices at offset i * stridea in a and i * stridec in c
    X is a vector at offset i * stridex in x
    C = diag(X) * A or C = A * diag(X)
end for
Input Parameters
left_right

CHARACTER*1.

Specifies the position of the diagonal matrix in the matrix product

if left_right = 'L' or 'l' , then C = diag(X) * A;

if left_right = 'R' or 'r' , then C = A * diag(X).

m

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

n

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

a

REAL for sdgmm_batch_strided

DOUBLE PRECISION for ddgmm_batch_strided

COMPLEX for cdgmm_batch_strided

DOUBLE COMPLEX for zdgmm_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 sdgmm_batch_strided

DOUBLE PRECISION for ddgmm_batch_strided

COMPLEX for cdgmm_batch_strided

DOUBLE COMPLEX for zdgmm_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 diagonal matrix is on the right of the product or m otherwise.

incx

INTEGER. Stride between two consecutive elements of the x vectors.

stridex

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

c

REAL for sdgmm_batch_strided

DOUBLE PRECISION for ddgmm_batch_strided

COMPLEX for cdgmm_batch_strided

DOUBLE COMPLEX for zdgmm_batch_strided

Array holding all the input matrix C. Must be of size at least batch_size * stridec.

ldc

INTEGER.

Specifies the leading dimension of the matrix C. It must be positive and at least m .

stridec

INTEGER.

Stride between two consecutive A matrices, must be at least ldc * n .

batch_size

INTEGER.

Number of dgmm computations to perform and a c matrices and x vectors. Must be at least 0.

Output Parameters
c

Array holding the batch_size updated matrices c.