rocsparse_scsr2ell Interface Reference#
hipfort_rocsparse::rocsparse_scsr2ell Interface Reference
Convert a sparse CSR matrix into a sparse ELL matrix. More...
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_scsr2ell_ (handle, m, csr_descr, csr_val, csr_row_ptr, csr_col_ind, ell_descr, ell_width, ell_val, ell_col_ind) |
| integer(kind(rocsparse_status_success)) function | rocsparse_scsr2ell_rank_0 (handle, m, csr_descr, csr_val, csr_row_ptr, csr_col_ind, ell_descr, ell_width, ell_val, ell_col_ind) |
| integer(kind(rocsparse_status_success)) function | rocsparse_scsr2ell_rank_1 (handle, m, csr_descr, csr_val, csr_row_ptr, csr_col_ind, ell_descr, ell_width, ell_val, ell_col_ind) |
Detailed Description
Convert a sparse CSR matrix into a sparse ELL matrix.
rocsparse_csr2ell converts a CSR matrix into an ELL matrix. It is assumed, that ell_val and ell_col_ind are allocated. Allocation size is computed by the number of rows times the number of ELL non-zero elements per row, such that \(\text{nnz}_{\text{ELL}} = m \cdot \text{ell_width}\). The number of ELL non-zero elements per row is obtained by rocsparse_csr2ell_width().
- Note
- This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
- This routine supports execution in a hipGraph context.
- Parameters
-
[in] handle - handle to the rocSPARSE library context queue. [in] m - number of rows of the sparse CSR matrix. [in] csr_descr - descriptor of the sparse CSR matrix. Currently, only rocsparse_matrix_type_generalis supported.[in] csr_val - array containing the values of the sparse CSR matrix. [in] csr_row_ptr - array of m+1elements that point to the start of every row of the sparse CSR matrix.[in] csr_col_ind - array containing the column indices of the sparse CSR matrix. [in] ell_descr - descriptor of the sparse ELL matrix. Currently, only rocsparse_matrix_type_generalis supported.[in] ell_width - number of non-zero elements per row in ELL storage format. [out] ell_val - array of mtimesell_widthelements of the sparse ELL matrix.[out] ell_col_ind - array of mtimesell_widthelements containing the column indices of the sparse ELL matrix.
- Return values
-
rocsparse_status_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_invalid_size morell_widthis invalid.rocsparse_status_invalid_pointer csr_descr,csr_val,csr_row_ptr,csr_col_ind,ell_descr,ell_val, orell_col_indpointer is invalid.rocsparse_status_not_implemented rocsparse_matrix_type!=rocsparse_matrix_type_general.
- Example
- This example converts a CSR matrix into an ELL matrix.
Member Function/Subroutine Documentation
◆ rocsparse_scsr2ell_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsr2ell::rocsparse_scsr2ell_ | ( | type(c_ptr), value | handle, |
| integer(c_int), value | m, | ||
| type(c_ptr), value | csr_descr, | ||
| type(c_ptr), value | csr_val, | ||
| type(c_ptr), value | csr_row_ptr, | ||
| type(c_ptr), value | csr_col_ind, | ||
| type(c_ptr), value | ell_descr, | ||
| integer(c_int), value | ell_width, | ||
| type(c_ptr), value | ell_val, | ||
| type(c_ptr), value | ell_col_ind | ||
| ) |
◆ rocsparse_scsr2ell_rank_0()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsr2ell::rocsparse_scsr2ell_rank_0 | ( | type(c_ptr) | handle, |
| integer(c_int) | m, | ||
| type(c_ptr) | csr_descr, | ||
| real(c_float), target | csr_val, | ||
| integer(c_int), target | csr_row_ptr, | ||
| integer(c_int), target | csr_col_ind, | ||
| type(c_ptr) | ell_descr, | ||
| integer(c_int) | ell_width, | ||
| real(c_float), target | ell_val, | ||
| integer(c_int), target | ell_col_ind | ||
| ) |
◆ rocsparse_scsr2ell_rank_1()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsr2ell::rocsparse_scsr2ell_rank_1 | ( | type(c_ptr) | handle, |
| integer(c_int) | m, | ||
| type(c_ptr) | csr_descr, | ||
| real(c_float), dimension(:), target | csr_val, | ||
| integer(c_int), dimension(:), target | csr_row_ptr, | ||
| integer(c_int), dimension(:), target | csr_col_ind, | ||
| type(c_ptr) | ell_descr, | ||
| integer(c_int) | ell_width, | ||
| real(c_float), dimension(:), target | ell_val, | ||
| integer(c_int), dimension(:), target | ell_col_ind | ||
| ) |
The documentation for this interface was generated from the following file: