Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
mkl_?dnscsr (deprecated)
Convert a sparse matrix in uncompressed representation to the CSR format and vice versa (deprecated).
Syntax
call mkl_sdnscsr ( job, m, n, adns, lda, acsr, ja, ia, info )
call mkl_ddnscsr ( job, m, n, adns, lda, acsr, ja, ia, info )
call mkl_cdnscsr ( job, m, n, adns, lda, acsr, ja, ia, info )
call mkl_zdnscsr ( job, m, n, adns, lda, acsr, ja, ia, info )
Include Files
mkl.fi
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
Parameter descriptions are common for all implemented interfaces, except that data types here refer to FORTRAN 77 standard types. Data types specific to the different interfaces are described in the section “Interfaces” below.
job
INTEGER
Array containing the following conversion parameters:
Parameter |
Description |
|---|---|
job(1): Conversion type. |
|
job(2): Data layout for matrix \(A\) in uncompressed (dense) format. |
|
job(3): Index base for matrix \(A\) in CSR format. |
|
job(4): Portion of matrix \(A\) to be converted. |
|
job(5): nzmax. |
Maximum number of the non-zero elements allowed if job(1)=0. |
job(6): Job indicator for conversion to CSR format. |
|
m
INTEGER
Number of rows of matrix \(A\).
n
INTEGER
Number of columns of matrix \(A\).
adns
(input/output)
Data Type |
Routine |
|---|---|
REAL |
mkl_sdnscsr |
DOUBLE PRECISION |
mkl_ddnscsr |
COMPLEX |
mkl_cdnscsr |
DOUBLE COMPLEX |
mkl_zdnscsr |
If the conversion type is from uncompressed to CSR, on input adns contains an uncompressed (dense) representation of matrix \(A\).
lda
INTEGER
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)
Data Type |
Routine |
|---|---|
REAL |
mkl_sdnscsr |
DOUBLE PRECISION |
mkl_ddnscsr |
COMPLEX |
mkl_cdnscsr |
DOUBLE COMPLEX |
mkl_zdnscsr |
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)
INTEGER
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)
INTEGER
If the conversion type is from CSR to uncompressed, on input 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 + 1) is equal to the number of non-zeros plus one. 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
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
FORTRAN 77:
SUBROUTINE mkl_sdnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
INTEGER job(8)
INTEGER m, n, lda, info
INTEGER ja(*), ia(m+1)
REAL adns(*), acsr(*)
SUBROUTINE mkl_ddnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
INTEGER job(8)
INTEGER m, n, lda, info
INTEGER ja(*), ia(m+1)
DOUBLE PRECISION adns(*), acsr(*)
SUBROUTINE mkl_cdnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
INTEGER job(8)
INTEGER m, n, lda, info
INTEGER ja(*), ia(m+1)
COMPLEX adns(*), acsr(*)
SUBROUTINE mkl_zdnscsr(job, m, n, adns, lda, acsr, ja, ia, info)
INTEGER job(8)
INTEGER m, n, lda, info
INTEGER ja(*), ia(m+1)
DOUBLE COMPLEX adns(*), acsr(*)