rocsparse_scsr2hyb Interface Reference

rocsparse_scsr2hyb Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_scsr2hyb Interface Reference
hipfort_rocsparse::rocsparse_scsr2hyb Interface Reference

Convert a sparse CSR matrix into a sparse HYB matrix. More...

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_scsr2hyb_ (handle, m, n, descr, csr_val, csr_row_ptr, csr_col_ind, hyb, user_ell_width, partition_type)
 
integer(kind(rocsparse_status_success)) function rocsparse_scsr2hyb_rank_0 (handle, m, n, descr, csr_val, csr_row_ptr, csr_col_ind, hyb, user_ell_width, partition_type)
 
integer(kind(rocsparse_status_success)) function rocsparse_scsr2hyb_rank_1 (handle, m, n, descr, csr_val, csr_row_ptr, csr_col_ind, hyb, user_ell_width, partition_type)
 

Detailed Description

Convert a sparse CSR matrix into a sparse HYB matrix.

rocsparse_csr2hyb converts a CSR matrix into a HYB matrix. It is assumed that hyb has been initialized with rocsparse_create_hyb_mat().

Note
This function requires a significant amount of storage for the HYB matrix, depending on the matrix structure.
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 CSR matrix.
[in]n- number of columns of the sparse CSR matrix.
[in]descr- descriptor of the sparse CSR matrix. Currently, only rocsparse_matrix_type_general is supported.
[in]csr_val- array containing the values of the sparse CSR matrix.
[in]csr_row_ptr- array of m+1 elements 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.
[out]hyb- sparse matrix in HYB format.
[in]user_ell_width- width of the ELL part of the HYB matrix (only required if partition_type == rocsparse_hyb_partition_user).
[in]partition_type- rocsparse_hyb_partition_auto (recommended), rocsparse_hyb_partition_user, or rocsparse_hyb_partition_max.
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizem, n, or user_ell_width is invalid.
rocsparse_status_invalid_valuepartition_type is invalid.
rocsparse_status_invalid_pointerdescr, hyb, csr_val, csr_row_ptr, or csr_col_ind pointer is invalid.
rocsparse_status_memory_errorthe buffer for the HYB matrix could not be allocated.
rocsparse_status_internal_erroran internal error occurred.
rocsparse_status_not_implementedrocsparse_matrix_type != rocsparse_matrix_type_general.
Example
This example converts a CSR matrix into a HYB matrix using user-defined partitioning.

Member Function/Subroutine Documentation

◆ rocsparse_scsr2hyb_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsr2hyb::rocsparse_scsr2hyb_ ( type(c_ptr), value  handle,
integer(c_int), value  m,
integer(c_int), value  n,
type(c_ptr), value  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  hyb,
integer(c_int), value  user_ell_width,
integer(kind(rocsparse_hyb_partition_auto)), value  partition_type 
)

◆ rocsparse_scsr2hyb_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsr2hyb::rocsparse_scsr2hyb_rank_0 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
type(c_ptr)  descr,
real(c_float), target  csr_val,
integer(c_int), target  csr_row_ptr,
integer(c_int), target  csr_col_ind,
type(c_ptr)  hyb,
integer(c_int)  user_ell_width,
integer(kind(rocsparse_hyb_partition_auto))  partition_type 
)

◆ rocsparse_scsr2hyb_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_scsr2hyb::rocsparse_scsr2hyb_rank_1 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
type(c_ptr)  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)  hyb,
integer(c_int)  user_ell_width,
integer(kind(rocsparse_hyb_partition_auto))  partition_type 
)

The documentation for this interface was generated from the following file: