Skip to main content

Module csr

Module csr 

Source
Expand description

Compressed Sparse Row (CSR) format.

CSR is the most widely used sparse matrix format. It stores:

  • row_ptr[rows+1]: indices into col_idx/values for each row
  • col_idx[nnz]: column index for each non-zero
  • values[nnz]: the non-zero values

This is the primary format for SpMV, SpMM, and most sparse operations.

Structsยง

CsrMatrix
A sparse matrix in Compressed Sparse Row (CSR) format, stored on GPU.