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

mkl_?imatcopy_batch

Computes a group of in-place scaled matrix copy or transposition operations on general matrices.

Syntax

call mkl_simatcopy_batch(layout, trans_arrau, rows_arrau, cols_array, alpha_array, AB_array, lda_array, ldb_array, group_size, group_count)

call mkl_dimatcopy_batch(layout, trans_arrau, rows_arrau, cols_array, alpha_array, AB_array, lda_array, ldb_array, group_size, group_count)

call mkl_cimatcopy_batch(layout, trans_arrau, rows_arrau, cols_array, alpha_array, AB_array, lda_array, ldb_array, group_size, group_count)

call mkl_zimatcopy_batch(layout, trans_arrau, rows_arrau, cols_array, alpha_array, AB_array, lda_array, ldb_array, group_size, group_count)

Description

The mkl_?imatcopy_batch routine performs a series of in-place scaled matrix copies or transpositions. They are similar to the mkl_?imatcopy routine counterparts, but the mkl_?imatcopy_batch routine performs matrix operations with groups of matrices. Each group has the same parameters (matrix size, leading dimension, and scaling parameter), but a single call to mkl_?imatcopy_batch operates on multiple groups, and each group can have different parameters, unlike the related mkl_?imatcopy_batch_strided routines.

The operation is defined as

idx = 0
for i = 0..group_count - 1
     m in rows_array[i], n in cols_array[i], and alpha in alpha_array[i]
     for j = 0..group_size[i] - 1 
          AB matrices in AB_array[idx]
          AB := alpha*op(AB)
          idx = idx + 1
     end for
end for

Where op(X) is one of op(X)=X, op(X)=X', op(X)=conjg(X'), or op(X)=conjg(X). On entry, AB is a m-by-n matrix such that m and n are elements of rows_array and cols_array.

AB represents a matrix stored at addresses pointed to by AB_array. The number of entries in AB_array is total_batch_count = the sum of all of the group_size entries.

Input Parameters

layout

CHARACTER*1.

Specifies whether two-dimensional array storage is row-major (R) or column-major (C).

trans_array

CHARACTER*1.

Array of size group_count. For the group i, trans = trans_array[i] specifies the form of op(AB), the transposition operation applied to the AB matrix:

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

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

If trans = 'C' or 'c', op(AB)=conjg(AB')

If trans = 'R' or 'r', op(AB)=conjg(AB)

rows_array

INTEGER. Array of size group_count. Specifies the number of rows of the input matrix AB. The value of each element must be at least zero.

cols_array

INTEGER. Array of size group_count. Specifies the number of columns of the input matrix AB. The value of each element must be at least zero.

alpha_array

REAL for mkl_simatcopy_batch.

DOUBLE PRECISION for mkl_dimatcopy_batch.

COMPLEX for mkl_cimatcopy_batch.

DOUBLE COMPLEX for mkl_zimatcopy_batch.

Array of size group_count. Specifies the scalar alpha.

AB_array

INTEGER*8 for Intel® 64 architecture.

INTEGER*4 for IA-32 architecture.

Array of size total_batch_count, holding pointers to arrays used to store AB matrices.

lda_array

INTEGER. Array of size group_count. The leading dimension of the matrix input AB. It must be positive and at least m if column major layout is used or at least n if row major layout is used.

ldb_array

INTEGER. Array of size group_count. The leading dimension of the matrix input AB. It must be positive and at least

m if column major layout is used and op(AB) = AB or conjg(AB)

n if row major layout is used and op(AB) = AB' or conjg(AB')

n otherwise

group_count

INTEGER. Specifies the number of groups. Must be at least 0

group_size

INTEGER. Array of size group_count. The element group_size[i] specifies the number of matrices in group i. Each element in group_size must be at least 0.

Output Parameters

AB_array

INTEGER*8 for Intel® 64 architecture.

INTEGER*4 for IA-32 architecture.

Output array of size total_batch_count, holding pointers to arrays used to store the updated AB matrices.