rocsparse_sell2csr Interface Reference#
hipfort_rocsparse::rocsparse_sell2csr Interface Reference
Convert a sparse ELL matrix into a sparse CSR matrix. More...
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_sell2csr_ (handle, m, n, ell_descr, ell_width, ell_val, ell_col_ind, csr_descr, csr_val, csr_row_ptr, csr_col_ind) |
| integer(kind(rocsparse_status_success)) function | rocsparse_sell2csr_rank_0 (handle, m, n, ell_descr, ell_width, ell_val, ell_col_ind, csr_descr, csr_val, csr_row_ptr, csr_col_ind) |
| integer(kind(rocsparse_status_success)) function | rocsparse_sell2csr_rank_1 (handle, m, n, ell_descr, ell_width, ell_val, ell_col_ind, csr_descr, csr_val, csr_row_ptr, csr_col_ind) |
Detailed Description
Convert a sparse ELL matrix into a sparse CSR matrix.
rocsparse_ell2csr converts a ELL matrix into a CSR matrix. It is assumed that csr_row_ptr has already been filled and that csr_val and csr_col_ind are allocated by the user. The allocation size for csr_row_ptr is computed as m+1. The allocation size for csr_val and csr_col_ind is computed using rocsparse_ell2csr_nnz() which also fills in csr_row_ptr.
- 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 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_generalis supported.[in] ell_width - number of non-zero elements per row in ELL storage format. [in] ell_val - array of mtimesell_widthelements of the sparse ELL matrix.[in] ell_col_ind - array of mtimesell_widthelements containing the column indices of the sparse ELL matrix.[in] csr_descr - descriptor of the sparse CSR matrix. Currently, only rocsparse_matrix_type_generalis supported.[out] 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.[out] csr_col_ind - array containing the column indices of the sparse CSR matrix.
- 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, orell_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 an ELL matrix into a CSR matrix.
Member Function/Subroutine Documentation
◆ rocsparse_sell2csr_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sell2csr::rocsparse_sell2csr_ | ( | type(c_ptr), value | handle, |
| integer(c_int), value | m, | ||
| integer(c_int), value | n, | ||
| 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, | ||
| 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 | ||
| ) |
◆ rocsparse_sell2csr_rank_0()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sell2csr::rocsparse_sell2csr_rank_0 | ( | type(c_ptr) | handle, |
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| type(c_ptr) | ell_descr, | ||
| integer(c_int) | ell_width, | ||
| real(c_float), target | ell_val, | ||
| integer(c_int), target | ell_col_ind, | ||
| 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 | ||
| ) |
◆ rocsparse_sell2csr_rank_1()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sell2csr::rocsparse_sell2csr_rank_1 | ( | type(c_ptr) | handle, |
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| 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, | ||
| 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 | ||
| ) |
The documentation for this interface was generated from the following file: