Data Storage
Full-Storage Format for Vectors
All elements in a vector are stored.
Sparse Matrix Storage Format
The compressed sparse row (CSR) format is specified by the following arrays: value, column, and pointerB. For the LLT or LLH factorization method in cluster mode, only the upper or lower triangular part of a matrix is stored. Table 1 describes the three arrays in sparse matrix A in CSR format.
|
Array |
Description |
|---|---|
|
value |
|
|
column |
|
|
pointerB |
|
Matrix A
can be represented in CSR format as in Table 2.
When the LLT or LLH factorization method in cluster mode is used, only the upper triangular matrix needs to be stored. See Table 3.
|
Matrix |
Indexing Method |
CSR Format |
|---|---|---|
|
|
Zero-based indexing |
value = [2, -3, 7, -3, 1, -6, 1, -4, 5, 7, -6, 5] column = [0, 1, 3, 0, 2, 3, 1, 2, 3, 0, 1, 2] pointerB = [0, 3, 6, 9, 12] |
|
Matrix |
Indexing Method |
CSR Format |
|---|---|---|
|
|
Zero-based indexing |
value = [2, -3, 7, 1, -6, -4, 5] column = [0, 1, 3, 2, 3, 2, 3] pointerB = [0, 3, 5, 7, 7] |
CSC (Compressed Sparse Column) format, which contains three elements: value, row, and pointerB (column index). The format is similar to the CSR format and is not described here.
COO (Coordinate) format, which contains three elements: value, row, and column. Table 4 describes the three arrays in sparse matrix A in COO format.
|
Parameter |
Description |
|---|---|
|
value |
|
|
row |
|
|
column |
|
Matrix A
can be represented in COO format as in Table 5.
|
Matrix |
COO Format |
|---|---|
|
|
value = [2, -3, 7, -3, 1, -6, 1, -4, 5, 7, -6, 5] row = [0, 1, 3, 0, 2, 3, 1, 2, 3, 0, 1, 2] column = [0, 1, 3, 0, 2, 3, 1, 2, 3, 0, 1, 2] |
Storage Formats of Dense Matrices
Dense formats are classified into row-major and column-major layouts, which consist of the data values and the leading dimension (ld). If dense matrix A is row-major, ld represents the array length required to store each row; if it is column-major, ld represents the array length required to store each column. Table 6 describes the parameters of dense matrix A.
|
Parameter |
Description |
|---|---|
|
value |
|
|
ld |
An integer representing the stride between elements of two rows (columns), which is greater than or equal to the number of elements in a row (column). |
Assume that matrix A is
. Table 7 shows the dense storage formats of matrix A.



