Contents

# mkl_?dnscsr

Convert a sparse matrix in uncompressed representation to the CSR format and vice versa (deprecated).

## Syntax

Include Files
• mkl.h
Description
This routine is deprecated. Use the matrix manipulation routinesfrom the
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:
• job

: Conversion type.
• If
job

=0
, the rectangular matrix
A
is converted to the CSR format;
• if
job

=1
, the rectangular matrix
A
is restored from the CSR format.
• job

: index base for the rectangular matrix
A
.
• If
job

=0
, zero-based indexing for the rectangular matrix
A
is used;
• if
job

=1
, one-based indexing for the rectangular matrix
A
is used.
• job

: Index base for the matrix in CSR format.
• If
job

=0
, zero-based indexing for the matrix in CSR format is used;
• if
job

=1
, one-based indexing for the matrix in CSR format is used.
• job

: Portion of matrix.
• If
job

=0
,
is a lower triangular part of matrix
A
;
• If
job

=1
,
is an upper triangular part of matrix
A
;
• If
job

=2
,
is a whole matrix
A
.
• job

=
nzmax
: maximum number of the non-zero elements allowed if
job

=0
.
• job

: job indicator for conversion to CSR format.
• If
job

=0
, only array
ia
is generated for the output storage.
• If
job

>0
, arrays
acsr
,
ia
,
ja
are generated for the output storage.
m
Number of rows of the matrix
A
.
n
Number of columns of the matrix
A
.
(input/output)
If the conversion type is from uncompressed to CSR, on input
contains an uncompressed (dense) representation of matrix
A
.
lda
as declared in the calling (sub)program.
For zero-based indexing of
A
,
lda
must be at least
max(1,
n
)
.
For one-based indexing of
A
,
lda
must be at least
max(1,
m
)
.
acsr
(input/output)
If 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 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). Array of length
m
+ 1
.
If 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 from the 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 from the row
i
.
The value of
ia
[
m
] -
ia

is equal to the number of non-zeros. Refer to
rowIndex
array description in Sparse Matrix Storage Formats for more details.
Output Parameters
If conversion type is from CSR to uncompressed, on output
contains the uncompressed (dense) representation of matrix
A
.
acsr
,
ja
,
ia
If 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 info indicator only for restoring the matrix
A
from the CSR format.
If
info
=0
, the execution is successful.
If
info
=
i
, the routine is interrupted processing the
i
-th row because there is no space in the arrays
acsr
and
ja
according to the value
nzmax
.

#### Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.