|
| integer(kind(rocsparse_status_success)) function | rocsparse_ell2csr_nnz_ (handle, m, n, ell_descr, ell_width, ell_col_ind, csr_descr, csr_row_ptr, csr_nnz) |
| |
| integer(kind(rocsparse_status_success)) function | rocsparse_ell2csr_nnz_rank_0 (handle, m, n, ell_descr, ell_width, ell_col_ind, csr_descr, csr_row_ptr, csr_nnz) |
| |
| integer(kind(rocsparse_status_success)) function | rocsparse_ell2csr_nnz_rank_1 (handle, m, n, ell_descr, ell_width, ell_col_ind, csr_descr, csr_row_ptr, csr_nnz) |
| |
This function takes a sparse ELL matrix as input and computes the row offset array, csr_row_ptr, and the total number of non-zeros, csr_nnz, that will result from converting the ELL format input matrix to a CSR format output matrix. This function is the first step in the conversion and is used in conjunction with rocsparse_Xell2csr(). It is assumed that csr_row_ptr has been allocated with size m+1.
- Note
- This function is blocking with respect to the host.
-
This routine does not support execution in a hipGraph context.
- Parameters
-
| [in] | handle | - handle to the rocSPARSE library context queue. |
| [in] | m | - number of rows of the sparse ELL matrix. |
| [in] | n | - number of columns of the sparse ELL matrix. |
| [in] | ell_descr | - descriptor of the sparse ELL matrix. Currently, only rocsparse_matrix_type_general is supported. |
| [in] | ell_width | - number of non-zero elements per row in ELL storage format. |
| [in] | ell_col_ind | - array of m times ell_width elements containing the column indices of the sparse ELL matrix. |
| [in] | csr_descr | - descriptor of the sparse CSR matrix. Currently, only rocsparse_matrix_type_general is supported. |
| [out] | csr_row_ptr | - array of m+1 elements that point to the start of every row of the sparse CSR matrix. |
| [out] | csr_nnz | - pointer to the total number of non-zero elements in CSR storage format. |
- Return values
-
| rocsparse_status_success | the operation completed successfully. |
| rocsparse_status_invalid_handle | the library context was not initialized. |
| rocsparse_status_invalid_size | m, n, or ell_width is invalid. |
| rocsparse_status_invalid_pointer | ell_descr, ell_col_ind, csr_descr, csr_row_ptr, or csr_nnz pointer is invalid. |
| rocsparse_status_not_implemented | rocsparse_matrix_type != rocsparse_matrix_type_general. |