## Developer Reference

• 2020.2
• 07/15/2020
• Public Content
Contents

# Sparse BLAS CSC Matrix Storage Format

The compressed sparse column format (CSC) is similar to the CSR format, but the columns are used instead the rows. In other words, the CSC format is identical to the CSR format for the transposed matrix. The CSR format is specified by four arrays:
values
,
columns
,
pointerB
, and
pointerE
. The following table describes the arrays in terms of the values, row, and column positions of the non-zero elements in a sparse matrix
A
.
values
A real or complex array that contains the non-zero elements of
A
. Values of the non-zero elements of
A
are mapped into the
values
array using the column-major storage mapping.
rows
Element
i
of the integer array
rows
is the number of the row in
A
that contains the
i
-th value in the
values
array.
pointerB
Element
j
of this integer array gives the index of the element in the
values
array that is first non-zero element in a column
j
of
A
. Note that this index is equal to
pointerB
(
j
)-
indexing
for Inspector-executor Sparse BLAS CSC arrays.
pointerE
An integer array that contains column indices, such that
pointerE
(
j
)-
indexing
is the index of the element in the
values
array that is last non-zero element in a column
j
of
A
.
The length of the
values
and
columns
arrays is equal to the number of non-zero elements in
A
. The length of the
pointerB
and
pointerE
arrays is equal to the number of columns in
A
.
Note that the
Intel® MKL
Sparse BLAS routines support the CSC format both with one-based indexing and zero-based indexing.
For example, consider matrix
B
: It can be represented in the CSC format as:
 one-based indexing values = (1 -2 -4 -1 5 8 4 2 -3 6 7 4 -5) rows = (1 2 4 1 2 5 3 4 1 3 4 3 5) pointerB = (1 4 7 9 12) pointerE = (4 7 9 12 14) zero-based indexing values = (1 -2 -4 -1 5 8 4 2 -3 6 7 4 -5) rows = (0 1 3 0 1 4 2