rocsparse_shyb2csr Interface Reference#
hipfort_rocsparse::rocsparse_shyb2csr Interface Reference
Convert a sparse HYB matrix into a sparse CSR matrix. More...
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_shyb2csr_ (handle, descr, hyb, csr_val, csr_row_ptr, csr_col_ind, temp_buffer) |
| integer(kind(rocsparse_status_success)) function | rocsparse_shyb2csr_rank_0 (handle, descr, hyb, csr_val, csr_row_ptr, csr_col_ind, temp_buffer) |
| integer(kind(rocsparse_status_success)) function | rocsparse_shyb2csr_rank_1 (handle, descr, hyb, csr_val, csr_row_ptr, csr_col_ind, temp_buffer) |
Detailed Description
Convert a sparse HYB matrix into a sparse CSR matrix.
rocsparse_hyb2csr converts a HYB matrix into a CSR matrix. This requires a HYB input structure, rocsparse_hyb_mat, which is created using rocsparse_create_hyb_mat and is filled with data using the conversion routine rocsparse_Xcsr2hyb().
Converting back to a sparse CSR matrix from a sparse HYB matrix requires two steps. First, call rocsparse_hyb2csr_buffer_size to determine the size of the required temporary storage buffer. After this is determined, allocate this buffer. Finally, call rocsparse_Xhyb2csr() to complete the conversion.
- 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] descr - descriptor of the sparse HYB matrix. Currently, only rocsparse_matrix_type_generalis supported.[in] hyb - sparse matrix in HYB format. [out] csr_val - array containing the values of the sparse CSR matrix. [out] 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. [in] temp_buffer - temporary storage buffer allocated by the user. The size is returned by rocsparse_hyb2csr_buffer_size().
- Return values
-
rocsparse_status_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_invalid_pointer descr,hyb,csr_val,csr_row_ptr,csr_col_ind, ortemp_bufferpointer is invalid.rocsparse_status_internal_error an internal error occurred. rocsparse_status_not_implemented rocsparse_matrix_type!=rocsparse_matrix_type_general.
- Example
- This example converts a HYB matrix into a CSR matrix.
Member Function/Subroutine Documentation
◆ rocsparse_shyb2csr_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_shyb2csr::rocsparse_shyb2csr_ | ( | type(c_ptr), value | handle, |
| type(c_ptr), value | descr, | ||
| type(c_ptr), value | hyb, | ||
| type(c_ptr), value | csr_val, | ||
| type(c_ptr), value | csr_row_ptr, | ||
| type(c_ptr), value | csr_col_ind, | ||
| type(c_ptr), value | temp_buffer | ||
| ) |
◆ rocsparse_shyb2csr_rank_0()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_shyb2csr::rocsparse_shyb2csr_rank_0 | ( | type(c_ptr) | handle, |
| type(c_ptr) | descr, | ||
| type(c_ptr) | hyb, | ||
| real(c_float), target | csr_val, | ||
| integer(c_int), target | csr_row_ptr, | ||
| integer(c_int), target | csr_col_ind, | ||
| type(c_ptr) | temp_buffer | ||
| ) |
◆ rocsparse_shyb2csr_rank_1()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_shyb2csr::rocsparse_shyb2csr_rank_1 | ( | type(c_ptr) | handle, |
| type(c_ptr) | descr, | ||
| type(c_ptr) | hyb, | ||
| 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) | temp_buffer | ||
| ) |
The documentation for this interface was generated from the following file: