Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
6743 Discussions

## Is there any efficient way (library or function or algorithm) to delete or append specific row and c Beginner
493 Views

Is there any efficient way (library or function or algorithm) to delete or append specific row and column component in Compressed Sparse Row format??

I'm using intel compiler however there are no any function to do that in Math Kernel Library.

So I need any information to delete or to append specific row and column data in CSR format.

1 Solution Moderator
481 Views

Hi Kim,

Thanks for reaching out to us.

Compressed Sparse row matrix (CSR) is a storage format by virtue of which one can achieve efficient access of elements of a sparse matrix. It is basically used for efficient matrix multiplication.

The CSR Matrix is a combination of 4 arrays namely values, columns, pointerB, pointerE. The use of the arrays are as follows:

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 row-major storage mapping described above.

columns

Element i of the integer array columns is the number of the column 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 row j of A. Note that this index is equal to pointerB[j]-indexing .

pointerE

An integer array that contains row indices, such that pointerE[j]-1-indexing is the index of the element in the values array that is last non-zero element in a row j of A.

With the insertion or deletion of element to your value array brings about change in the rest of the parameters. So, it is impossible to delete or append any row or column of CSR. For more information you can check the below link

https://software.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/appendix-a-linear-solvers-basics/sparse-matrix-storage-formats/sparse-blas-csr-matrix-storage-format.html

Regards,

Arpita

3 Replies Moderator
482 Views

Hi Kim,

Thanks for reaching out to us.

Compressed Sparse row matrix (CSR) is a storage format by virtue of which one can achieve efficient access of elements of a sparse matrix. It is basically used for efficient matrix multiplication.

The CSR Matrix is a combination of 4 arrays namely values, columns, pointerB, pointerE. The use of the arrays are as follows:

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 row-major storage mapping described above.

columns

Element i of the integer array columns is the number of the column 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 row j of A. Note that this index is equal to pointerB[j]-indexing .

pointerE

An integer array that contains row indices, such that pointerE[j]-1-indexing is the index of the element in the values array that is last non-zero element in a row j of A.

With the insertion or deletion of element to your value array brings about change in the rest of the parameters. So, it is impossible to delete or append any row or column of CSR. For more information you can check the below link

https://software.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/appendix-a-linear-solvers-basics/sparse-matrix-storage-formats/sparse-blas-csr-matrix-storage-format.html

Regards,

Arpita Moderator
451 Views

Hi Kim,

Regards,

Arpita Moderator
410 Views

Hi Kim,

We assume that your issue is resolved. If you need any additional information, please submit a new question as this thread will no longer be monitored.

Regards,

Arpita 