mkl_?csrbsr
mkl_?csrbsr
Converts a square sparse matrix in the CSR format to the BSR format and vice versa (deprecated).
Syntax
void
mkl_scsrbsr
(
const
MKL_INT
*job
,
const
MKL_INT
*m
,
const
MKL_INT
*mblk
,
const
MKL_INT
*ldabsr
,
float
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
float
*absr
,
MKL_INT
*jab
,
MKL_INT
*iab
,
MKL_INT
*info
);
void
mkl_dcsrbsr
(
const
MKL_INT
*job
,
const
MKL_INT
*m
,
const
MKL_INT
*mblk
,
const
MKL_INT
*ldabsr
,
double
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
double
*absr
,
MKL_INT
*jab
,
MKL_INT
*iab
,
MKL_INT
*info
);
void
mkl_ccsrbsr
(
const
MKL_INT
*job
,
const
MKL_INT
*m
,
const
MKL_INT
*mblk
,
const
MKL_INT
*ldabsr
,
MKL_Complex8
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
MKL_Complex8
*absr
,
MKL_INT
*jab
,
MKL_INT
*iab
,
MKL_INT
*info
);
void
mkl_zcsrbsr
(
const
MKL_INT
*job
,
const
MKL_INT
*m
,
const
MKL_INT
*mblk
,
const
MKL_INT
*ldabsr
,
MKL_Complex16
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
MKL_Complex16
*absr
,
MKL_INT
*jab
,
MKL_INT
*iab
,
MKL_INT
*info
);
Include Files
- mkl.h
Description
This routine is deprecated. Use the matrix manipulation routinesfrom the Inspector-executor Sparse BLAS interface instead.
Intel® oneAPI Math Kernel Library
This routine converts a square sparse matrix
A
stored in the compressed sparse row (CSR) format (3-array variation) to the block sparse row (BSR) format and vice versa.Input Parameters
- job
- Array, contains the following conversion parameters:job[0]If, the matrix in the CSR format is converted to the BSR format;=0job[0]if, the matrix in the BSR format is converted to the CSR format.=1job[0]job[1]If, zero-based indexing for the matrix in CSR format is used;=0job[1]if, one-based indexing for the matrix in CSR format is used.=1job[1]job[2]If, zero-based indexing for the matrix in the BSR format is used;=0job[2]if, one-based indexing for the matrix in the BSR format is used.=1job[2]is only used for conversion to CSR format. By default, the converter saves the blocks without checking whether an element is zero or not. Ifjob[3], then the converter only saves non-zero elements in blocks.=1job[3]- job indicator.job[5]For conversion to the BSR format:If, only arrays=0job[5]jab,iabare generated for the output storage.If, all output arrays>0job[5]absr,jab, andiabare filled in for the output storage.If,=-1job[5]returns the number of non-zero blocks.iab[m] -iab[0]For conversion to the CSR format:If, only arrays=0job[5]ja,iaare generated for the output storage.
- m
- Actual row dimension of the matrixAfor convert to the BSR format; block row dimension of the matrixAfor convert to the CSR format.
- mblk
- Size of the block in the matrixA.
- ldabsr
- Leading dimension of the arrayabsras declared in the calling program.ldabsrmust be greater than or equal to.mblk*mblk
- acsr
- (input/output)Array containing non-zero elements of the matrixA. Its length is equal to the number of non-zero elements in the matrixA. Refer tovaluesarray description in Sparse Matrix Storage Formats for more details.
- ja
- (input/output). Array containing the column indices for each non-zero element of the matrixA.Its length is equal to the length of the arrayacsr. Refer tocolumnsarray description in Sparse Matrix Storage Formats for more details.
- ia
- (input/output). Array of length, containing indices of elements in the arraym+ 1acsr, such thatis the index in the arrayia[I]] -iab[0]acsrof the first non-zero element from the rowI. The value ofis equal to the number of non-zeros. Refer toia[m]] -iab[0]rowIndexarray description in Sparse Matrix Storage Formats for more details.
- absr
- (input/output)Array containing elements of non-zero blocks of the matrixA. Its length is equal to the number of non-zero blocks in the matrixAmultiplied by. Refer tomblk*mblkvaluesarray description in BSR Format for more details.
- jab
- (input/output). Array containing the column indices for each non-zero block of the matrixA.Its length is equal to the number of non-zero blocks of the matrixA. Refer tocolumnsarray description in BSR Format for more details.
- iab
- (input/output). Array of length(, containing indices of blocks in the arraym+ 1)absr, such thatis the index in the arrayiab[i] -iab[0]absrof the first non-zero element from thei-th row . The value ofis equal to the number of non-zero blocks. Refer toiab[m]rowIndexarray description in BSR Format for more details.
Output Parameters
- info
- Integer info indicator only for converting the matrixAfrom the CSR format.Ifinfo=0, the execution is successful.Ifinfo=1, it means thatmblkis equal to 0.Ifinfo=2, it means thatldabsris less thanand there is no space for all blocks.mblk*mblk