Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
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_?imatcopy

Performs scaling and in-place transposition/copying of matrices.

Syntax

call mkl_simatcopy(ordering, trans, rows, cols, alpha, ab, lda, ldb)

call mkl_dimatcopy(ordering, trans, rows, cols, alpha, ab, lda, ldb)

call mkl_cimatcopy(ordering, trans, rows, cols, alpha, ab, lda, ldb)

call mkl_zimatcopy(ordering, trans, rows, cols, alpha, ab, lda, ldb)

Include Files

  • mkl.fi

Description

The mkl_?imatcopy routine performs scaling and in-place transposition/copying of matrices. A transposition operation can be a normal matrix copy, a transposition, a conjugate transposition, or just a conjugation. The operation is defined as follows:

AB := alpha*op(AB).

Parameter descriptions are common for all implemented interfaces with the exception of data types that refer here to the FORTRAN 77 standard types. Data types specific to the different interfaces are described in the section "Interfaces" below.

NOTE:

Different arrays must not overlap.

Input Parameters

ordering

CHARACTER*1. Ordering of the matrix storage.

If ordering = 'R' or 'r', the ordering is row-major.

If ordering = 'C' or 'c', the ordering is column-major.

trans

CHARACTER*1. Parameter that specifies the operation type.

If trans = 'N' or 'n', op(AB)=AB and the matrix AB is assumed unchanged on input.

If trans = 'T' or 't', it is assumed that AB should be transposed.

If trans = 'C' or 'c', it is assumed that AB should be conjugate transposed.

If trans = 'R' or 'r', it is assumed that AB should be only conjugated.

If the data is real, then trans = 'R' is the same as trans = 'N', and trans = 'C' is the same as trans = 'T'.

rows

INTEGER. The number of rows in matrix AB before the transpose operation.

cols

INTEGER. The number of columns in matrix AB before the transpose operation.

ab

REAL for mkl_simatcopy.

DOUBLE PRECISION for mkl_dimatcopy.

COMPLEX for mkl_cimatcopy.

DOUBLE COMPLEX for mkl_zimatcopy.

Array, size ab(lda,*).

alpha

REAL for mkl_simatcopy.

DOUBLE PRECISION for mkl_dimatcopy.

COMPLEX for mkl_cimatcopy.

DOUBLE COMPLEX for mkl_zimatcopy.

This parameter scales the input matrix by alpha.

lda

INTEGER. Distance between the first elements in adjacent columns (in the case of the column-major order) or rows (in the case of the row-major order) in the source matrix; measured in the number of elements.

This parameter must be at least rows if ordering = 'C' or 'c', and max(1,cols) otherwise.

ldb

INTEGER. Distance between the first elements in adjacent columns (in the case of the column-major order) or rows (in the case of the row-major order) in the destination matrix; measured in the number of elements.

To determine the minimum value of ldb on output, consider the following guideline:

If ordering = 'C' or 'c', then

  • If trans = 'T' or 't' or 'C' or 'c', this parameter must be at least max(1,cols)

  • If trans = 'N' or 'n' or 'R' or 'r', this parameter must be at least max(1,rows)

If ordering = 'R' or 'r', then

  • If trans = 'T' or 't' or 'C' or 'c', this parameter must be at least max(1,rows)

  • If trans = 'N' or 'n' or 'R' or 'r', this parameter must be at least max(1,cols)

Output Parameters

ab

REAL for mkl_simatcopy.

DOUBLE PRECISION for mkl_dimatcopy.

COMPLEX for mkl_cimatcopy.

DOUBLE COMPLEX for mkl_zimatcopy.

Array, size ab(ldb,*).

Contains the matrix AB.

Application Notes

For threading to be active in mkl_?imatcopy, the pointer AB must be aligned on the 64-byte boundary. This requirement can be met by allocating AB with mkl_malloc.

Interfaces

FORTRAN 77:

SUBROUTINE mkl_simatcopy ( ordering, trans, rows, cols, alpha, ab, lda, ldb )
   CHARACTER*1 ordering, trans
   INTEGER rows, cols, src_ld, dst_ld
   REAL ab(*), alpha*

SUBROUTINE mkl_dimatcopy ( ordering, trans, rows, cols, alpha, ab, lda, ldb )
   CHARACTER*1 ordering, trans
   INTEGER rows, cols, src_ld, dst_ld
   DOUBLE PRECISION ab(*), alpha*

SUBROUTINE mkl_cimatcopy ( ordering, trans, rows, cols, alpha, ab, lda, ldb )
   CHARACTER*1 ordering, trans
   INTEGER rows, cols, src_ld, dst_ld
   COMPLEX ab(*), alpha*

SUBROUTINE mkl_zimatcopy ( ordering, trans, rows, cols, alpha, ab, lda, ldb )
   CHARACTER*1 ordering, trans
   INTEGER rows, cols, src_ld, dst_ld
   DOUBLE COMPLEX ab(*), alpha*