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

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

kim__seongik
Beginner
753 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.

0 Kudos
1 Solution
ArpitaP_Intel
Moderator
741 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


View solution in original post

0 Kudos
3 Replies
ArpitaP_Intel
Moderator
742 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


0 Kudos
ArpitaP_Intel
Moderator
711 Views

Hi Kim,


Please let us know, if your issue is resolved.


Regards,

Arpita


0 Kudos
ArpitaP_Intel
Moderator
670 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

 

0 Kudos
Reply