Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 11/07/2023
Public

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

Document Table of Contents

mkl_?omatcopy_batch_strided

Computes a group of out of place scaled matrix copy or transposition using general matrices.

Syntax

void mkl_somatcopy_batch_strided (const char layout, const char trans, size_t row, size_t col, const float alpha, const float * a, size_t lda, size_t stridea, float * b, size_t ldb, size_t strideb, size_t batch_size);

void mkl_domatcopy_batch_strided (const char layout, const char trans, size_t row, size_t col, const double alpha, const double * a, size_t lda, size_t stridea, double * b, size_t ldb, size_t strideb, size_t batch_size);

void mkl_comatcopy_batch_strided (const char layout, const char trans, size_t row, size_t col, const MKL_complex8 alpha, const MKL_complex8 * a, size_t lda, size_t stridea, MKL_complex8 * b, size_t ldb, size_t strideb, size_t batch_size);

void mkl_zomatcopy_batch_strided (const char layout, const char trans, size_t row, size_t col, const MKL_complex16 alpha, const MKL_complex16 * a, size_t lda, size_t stridea, MKL_complex16 * b, size_t ldb, size_t strideb, size_t batch_size);

Description

The mkl_?omatcopy_batch_strided routine performs a series of out-of-place scaled matrix copy or transposition. They are similar to the mkl_?omatcopy routine counterparts, but the mkl_?omatcopy_batch_strided routine performs matrix operations with group of matrices.

All matrices a and b have the same parameters (size, transposition operation…) and are stored at constant stride from each other respectively given by stridea and strideb. The operation is defined as

for i = 0 … batch_size – 1
    A and B are matrices at offset i * stridea in a and I * strideb in b
    B = alpha * op(A)
end for

Input Parameters

layout

Specifies whether two-dimensional array storage is row-major (CblasRowMajor) or column-major (CblasColMajor).

trans

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

If trans = 'N' or 'n', op(A)=A.

If trans = 'T' or 't', op(A)=A'

If trans = 'C' or 'c', op(A)=conig(A')

If trans = 'R' or 'r', op(A)=conig(A)

row

Specifies the number of rows of the matrices A and B. The value of row must be at least zero.

col

Specifies the number of columns of the matrices A and B. The value of col must be at least zero.

alpha

Specifies the scalar alpha.

a

Array holding all the input matrices A. Must be of size at least lda * k + stridea * (batch_size - 1) * stridea where k is col if column major is used and row otherwise.

lda

The leading dimension of the matrix input A. It must be positive and at least row if column major layout is used or at least col if row major layout is used.

stridea

Stride between two consecutive A matrices, must be at least 0.

b

Array holding all the output matrices B. Must be of size at least batch_size * strideb. The b array must be independent from the a array.

ldb

The leading dimension of the output matrix B. It must be positive and at least:

  • row if column major layout is used and op(A) = A or conjg(A)

  • row if row major layout is used and op(A) = A' or conjg(A')

  • col otherwise

strideb

Stride between two consecutive B matrices. It must be positive and at least:

  • ldb* col if column major layout is used and op(A) = A or conjg(A)

  • ldb* col if row major layout is used and op(A) = A' or conjg(A')

  • ldb*row otherwise

batch_size

Output Parameters

b

Array holding the batch_size updated matrices B.