mkl_?dnscsr
mkl_?dnscsr
Convert a sparse matrix in uncompressed representation to the CSR format and vice versa (deprecated).
Syntax
void
mkl_ddnscsr
(
const
MKL_INT
*job
,
const
MKL_INT
*m
,
const
MKL_INT
*n
,
double
*adns
,
const
MKL_INT
*lda
,
double
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
MKL_INT
*info
);
void
mkl_sdnscsr
(
const
MKL_INT
*job
,
const
MKL_INT
*m
,
const
MKL_INT
*n
,
float
*adns
,
const
MKL_INT
*lda
,
float
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
MKL_INT
*info
);
void
mkl_cdnscsr
(
const
MKL_INT
*job
,
const
MKL_INT
*m
,
const
MKL_INT
*n
,
MKL_Complex8
*adns
,
const
MKL_INT
*lda
,
MKL_Complex8
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
MKL_INT
*info
);
void
mkl_zdnscsr
(
const
MKL_INT
*job
,
const
MKL_INT
*m
,
const
MKL_INT
*n
,
MKL_Complex16
*adns
,
const
MKL_INT
*lda
,
MKL_Complex16
*acsr
,
MKL_INT
*ja
,
MKL_INT
*ia
,
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
between formats: stored as a rectangular array (dense representation) and stored using compressed sparse row (CSR) format (3-array variation). Input Parameters
- job
- Array, contains the following conversion parameters:
- : Conversion type.job[0]
- If, the rectangular matrix=0job[0]Ais converted to the CSR format;
- if, the rectangular matrix=1job[0]Ais restored from the CSR format.
- : index base for the rectangular matrixjob[1]A.
- If, zero-based indexing for the rectangular matrix=0job[1]Ais used;
- if, one-based indexing for the rectangular matrix=1job[1]Ais used.
- : Index base for the matrix in CSR format.job[2]
- If, zero-based indexing for the matrix in CSR format is used;=0job[2]
- if, one-based indexing for the matrix in CSR format is used.=1job[2]
- : Portion of matrix.job[3]
- If,=0job[3]adnsis a lower triangular part of matrixA;
- If,=1job[3]adnsis an upper triangular part of matrixA;
- If,=2job[3]adnsis a whole matrixA.
- : maximum number of the non-zero elements allowed if=job[4]nzmax.=0job[0]
- : job indicator for conversion to CSR format.job[5]
- If, only array=0job[5]iais generated for the output storage.
- If, arrays>0job[5]acsr,ia,jaare generated for the output storage.
- m
- Number of rows of the matrixA.
- n
- Number of columns of the matrixA.
- adns
- (input/output)If the conversion type is from uncompressed to CSR, on inputadnscontains an uncompressed (dense) representation of matrixA.
- lda
- Specifies the leading dimension ofadnsas declared in the calling (sub)program.For zero-based indexing ofA,ldamust be at leastmax(1,.n)For one-based indexing ofA,ldamust be at leastmax(1,.m)
- acsr
- (input/output)If conversion type is from CSR to uncompressed, on inputacsrcontains the 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). If conversion type is from CSR to uncompressed, on inputfor zero-based indexing ofAjacontains the column indicesplus onefor each non-zero element of the matrixA.For one-based indexing ofAjacontains 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.m+ 1If conversion type is from CSR to uncompressed, on inputfor zero-based indexing ofAiacontains indices of elements in the arrayacsr, such thatis the index in the arrayia[i] - 1acsrof the first non-zero element from the rowi.For one-based indexing ofAiacontains indices of elements in the arrayacsr, such thatis the index in the arrayia[i]acsrof the first non-zero element from the rowi.The value ofis equal to the number of non-zeros. Refer toia[m] -ia[0]rowIndexarray description in Sparse Matrix Storage Formats for more details.
Output Parameters
- adns
- If conversion type is from CSR to uncompressed, on outputadnscontains the uncompressed (dense) representation of matrixA.
- acsr,ja,ia
- If conversion type is from uncompressed to CSR, on outputacsr,ja, andiacontain the compressed sparse row (CSR) format (3-array variation) of matrixA(see Sparse Matrix Storage Formats for a description of the storage format).
- info
- Integer info indicator only for restoring the matrixAfrom the CSR format.Ifinfo=0, the execution is successful.Ifinfo=, the routine is interrupted processing theii-th row because there is no space in the arraysacsrandjaaccording to the valuenzmax.