mkl_?csrcoo
mkl_?csrcoo
Converts a sparse matrix in the CSR format to the coordinate format and vice versa (deprecated).
Syntax
void
mkl_scsrcoo
(
const
MKL_INT
*job
,
const
MKL_INT
*n
,
float
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
MKL_INT
*nnz
,
float
*acoo
,
MKL_INT
*rowind
,
MKL_INT
*colind
,
MKL_INT
*info
);
void
mkl_dcsrcoo
(
const
MKL_INT
*job
,
const
MKL_INT
*n
,
double
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
MKL_INT
*nnz
,
double
*acoo
,
MKL_INT
*rowind
,
MKL_INT
*colind
,
MKL_INT
*info
);
void
mkl_ccsrcoo
(
const
MKL_INT
*job
,
const
MKL_INT
*n
,
MKL_Complex8
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
MKL_INT
*nnz
,
MKL_Complex8
*acoo
,
MKL_INT
*rowind
,
MKL_INT
*colind
,
MKL_INT
*info
);
void
mkl_zcsrcoo
(
const
MKL_INT
*job
,
const
MKL_INT
*n
,
MKL_Complex16
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
MKL_INT
*nnz
,
MKL_Complex16
*acoo
,
MKL_INT
*rowind
,
MKL_INT
*colind
,
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 sparse matrix
A
stored in the compressed sparse row (CSR) format (3-array variation) to coordinate 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 coordinate format;=0job[0]if, the matrix in the coordinate format is converted to the CSR format.=1job[0]if, the matrix in the coordinate format is converted to the CSR format, and the column indices in CSR representation are sorted in the increasing order within each row.=2job[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 coordinate format is used;=0job[2]if, one-based indexing for the matrix in coordinate format is used.=1job[2]job[4]- maximum number of the non-zero elements allowed if=job[4]nzmax.=0job[0]- job indicator.job[5]For conversion to the coordinate format:If, only array=1job[5]rowindis filled in for the output storage.If, arrays=2job[5]rowind,colindare filled in for the output storage.If, all arrays=3job[5]rowind,colind,acooare filled in for the output storage.For conversion to the CSR format:If, all arrays=0job[5]acsr,ja,iaare filled in for the output storage.If, only array=1job[5]iais filled in for the output storage.If, then it is assumed that the routine already has been called with the=2job[5], and the user allocated the required space for storing the output arrays=1job[5]acsrandja.
- n
- Dimension of the matrixA.
- nnz
- Specifies the number of non-zero elements of the matrixAfor.job[0]≠0Refer tonnzdescription in Coordinate Format for more details.
- 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). For(one-based indexing for the matrix in CSR format), array containing the column indices plus one for each non-zero element of the matrixjob[1] = 1A.For(zero-based indexing for the matrix in CSR format), array containing the column indices for each non-zero element of the matrixjob[1] = 0A.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 arrayn+ 1acsr, such thatis the index in the arrayia[i] -ia[0]acsrof the first non-zero element from the rowi. The value of the last elementis equal to the number of non-zeros plus one. Refer toia[n] -ia[0]rowIndexarray description in Sparse Matrix Storage Formats for more details.
- acoo
- (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.
- rowind
- (input/output). Array of lengthnnz, contains the row indices for each non-zero element of the matrixA.Refer torowsarray description in Coordinate Format for more details.
- colind
- (input/output). Array of lengthnnz, contains the column indices for each non-zero element of the matrixA. Refer tocolumnsarray description in Coordinate Format for more details.
Output Parameters
- nnz
- Returns the number of converted elements of the matrixAfor.=0job[0]
- info
- Integer info indicator only for converting the matrixAfrom the CSR format.If, the execution is successful.info=0If, the routine is interrupted because there is no space in the arraysinfo=1acoo,rowind,colindaccording to the valuenzmax.