Developer Reference for Intel® oneAPI Math Kernel Library for C
mkl_?dnscsr (deprecated)
Convert a sparse matrix in uncompressed representation to the CSR format and vice versa (deprecated).
Syntax
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_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_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 mkl_sparse_?_convert_dense and mkl_sparse_?_dense2csr from the Intel® oneAPI Math Kernel Library (oneMKL) Inspector-executor Sparse BLAS interface instead.
This routine converts a sparse matrix \(A\) between two formats: a rectangular array (dense representation) and compressed sparse row (CSR) format (3-array variation).
Input Parameters
job
Array containing the following conversion parameters:
Parameter |
Description |
|---|---|
job[0]: Conversion type. |
|
job[1]: Data layout for matrix \(A\) in uncompressed (dense) format. |
|
job[2]: Index base for matrix \(A\) in CSR format. |
|
job[3]: Portion of matrix \(A\) to be converted. |
|
job[4]: nzmax. |
Maximum number of the non-zero elements allowed if job[0]=0. |
job[5]: Job indicator for conversion to CSR format. |
|
m
Number of rows of matrix \(A\).
n
Number of columns of matrix \(A\).
adns
(input/output)
If the conversion type is from uncompressed to CSR, on input adns contains an uncompressed (dense) representation of matrix \(A\).
lda
Specifies the leading dimension of adns as declared in the calling routine.
For row-major layout of \(A\), lda must be at least max(1, n). For column-major layout of \(A\), lda must be at least max(1, m).
acsr
(input/output)
If the conversion type is from CSR to uncompressed, on input acsr contains the non-zero elements of the matrix \(A\). Its length is equal to the number of non-zero elements in the matrix \(A\). Refer to values array description in Sparse Matrix Storage Formats for more details.
ja
(input/output)
If the conversion type is from CSR to uncompressed, on input, for zero-based indexing of \(A\), ja contains the column indices plus one for each non-zero element of the matrix \(A\). For one-based indexing of \(A\), ja contains the column indices for each non-zero element of the matrix \(A\).
Its length is equal to the length of the array acsr. Refer to columns array description in Sparse Matrix Storage Formats for more details.
ia
(input/output)
If the conversion type is from CSR to uncompressed, on input, for zero-based indexing of \(A\), ia contains indices of elements in the array acsr, such that ia[i] - 1 is the index in the array acsr of the first non-zero element in row i. For one-based indexing of \(A\), ia contains indices of elements in the array acsr, such that ia[i] is the index in the array acsr of the first non-zero element in row i.
The value of ia[m] - ia[0] is equal to the number of non-zeros. Refer to rowIndex array description in Sparse Matrix Storage Formats for more details.
Output Parameters
adns
If the conversion type is from CSR to uncompressed, on output adns contains the uncompressed (dense) representation of matrix \(A\).
acsr , ja , ia
If the conversion type is from uncompressed to CSR, on output acsr, ja, and ia contain the compressed sparse row (CSR) format (3-array variation) of matrix \(A\) (see Sparse Matrix Storage Formats for a description of the storage format).
info
Integer indicator relevant only when restoring the matrix \(A\) from CSR format.
If info=0, the execution is successful.
If info=i, the routine is interrupted while processing the i-th row because there is no space in the arrays acsr and ja according to the value nzmax.
Interfaces
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.