aoclsparse_csr2ell_width() - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
aoclsparse_status aoclsparse_csr2ell_width(aoclsparse_int m, aoclsparse_int nnz, const aoclsparse_int *csr_row_ptr, aoclsparse_int *ell_width)#

Convert a sparse CSR matrix into a sparse ELL matrix.

aoclsparse_csr2ell_width computes the maximum of the per row non-zero elements over all rows, the ELL width, for a given CSR matrix.

Parameters:
  • m[in] number of rows of the sparse CSR matrix.

  • nnz[in] number of non-zero entries of the sparse CSR matrix.

  • csr_row_ptr[in] array of m +1 elements that point to the start of every row of the sparse CSR matrix.

  • ell_width[out] pointer to the number of non-zero elements per row in ELL storage format.

Return values:
  • aoclsparse_status_success – the operation completed successfully.

  • aoclsparse_status_invalid_sizem is invalid.

  • aoclsparse_status_invalid_pointercsr_row_ptr, or ell_width pointer is invalid.

  • aoclsparse_status_internal_error – an internal error occurred.