rocsparse_sprune_csr2csr_nnz_by_percentage Interface Reference

rocsparse_sprune_csr2csr_nnz_by_percentage Interface Reference#

hipFORT API Reference: hipfort_rocsparse::rocsparse_sprune_csr2csr_nnz_by_percentage Interface Reference
hipfort_rocsparse::rocsparse_sprune_csr2csr_nnz_by_percentage Interface Reference

Public Member Functions

integer(c_int) function rocsparse_sprune_csr2csr_nnz_by_percentage_ (handle, m, n, nnz_a, csr_descr_a, csr_val_a, csr_row_ptr_a, csr_col_ind_a, percentage, csr_descr_c, csr_row_ptr_c, nnz_total_dev_host_ptr, myinfo, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_sprune_csr2csr_nnz_by_percentage_typed (handle, m, n, nnz_a, csr_descr_a, csr_val_a, csr_row_ptr_a, csr_col_ind_a, percentage, csr_descr_c, csr_row_ptr_c, nnz_total_dev_host_ptr, myinfo, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_sprune_csr2csr_nnz_by_percentage_rank_0 (handle, m, n, nnz_a, csr_descr_a, csr_val_a, csr_row_ptr_a, csr_col_ind_a, percentage, csr_descr_c, csr_row_ptr_c, nnz_total_dev_host_ptr, myinfo, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_sprune_csr2csr_nnz_by_percentage_rank_1 (handle, m, n, nnz_a, csr_descr_a, csr_val_a, csr_row_ptr_a, csr_col_ind_a, percentage, csr_descr_c, csr_row_ptr_c, nnz_total_dev_host_ptr, myinfo, temp_buffer)
 

Detailed Description

rocsparse_prune_csr2csr_nnz_by_percentage computes the number of non-zero elements per row and the total number of non-zero elements in a sparse CSR matrix after a percentage of the smallest magnitude elements have been pruned from the sparse CSR input matrix. See rocsparse_sprune_csr2csr_by_percentage() for a more detailed description of how this pruning based on percentage works.

Note
The routine supports asynchronous execution if the pointer mode is set to device.
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 in the sparse CSR matrix.
[in]n- number of columns in the sparse CSR matrix.
[in]nnz_A- number of non-zeros in the sparse CSR matrix \(A\).
[in]csr_descr_A- descriptor of the sparse CSR matrix \(A\). Currently, only rocsparse_matrix_type_general is supported.
[in]csr_val_A- array of nnz_A elements containing the values of the sparse CSR matrix \(A\).
[in]csr_row_ptr_A- array of m+1 elements that point to the start of every row of the sparse CSR matrix \(A\).
[in]csr_col_ind_A- array of nnz_A elements containing the column indices of the sparse CSR matrix \(A\).
[in]percentage- percentage>=0 and percentage<=100.
[in]csr_descr_C- descriptor of the sparse CSR matrix \(C\). Currently, only rocsparse_matrix_type_general is supported.
[out]csr_row_ptr_C- array of m+1 elements that point to the start of every row of the sparse CSR matrix \(C\).
[out]nnz_total_dev_host_ptr- total number of non-zero elements in device or host memory.
[in]myInfo- prune info structure.
[out]temp_buffer- buffer allocated by the user. Its size is determined by calling rocsparse_Xprune_csr2csr_by_percentage_buffer_size().
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizem, n, nnz_A, or percentage is invalid.
rocsparse_status_invalid_pointercsr_descr_A, csr_descr_C, info, csr_val_A, csr_row_ptr_A, csr_col_ind_A, csr_row_ptr_C, nnz_total_dev_host_ptr, or temp_buffer pointer is invalid.

Member Function/Subroutine Documentation

◆ rocsparse_sprune_csr2csr_nnz_by_percentage_()

integer(c_int) function hipfort_rocsparse::rocsparse_sprune_csr2csr_nnz_by_percentage::rocsparse_sprune_csr2csr_nnz_by_percentage_ ( type(c_ptr), value  handle,
integer(c_int), value  m,
integer(c_int), value  n,
integer(c_int), value  nnz_a,
type(c_ptr), value  csr_descr_a,
type(c_ptr), value  csr_val_a,
type(c_ptr), value  csr_row_ptr_a,
type(c_ptr), value  csr_col_ind_a,
real(c_float), value  percentage,
type(c_ptr), value  csr_descr_c,
type(c_ptr), value  csr_row_ptr_c,
type(c_ptr), value  nnz_total_dev_host_ptr,
type(c_ptr), value  myinfo,
type(c_ptr), value  temp_buffer 
)

◆ rocsparse_sprune_csr2csr_nnz_by_percentage_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sprune_csr2csr_nnz_by_percentage::rocsparse_sprune_csr2csr_nnz_by_percentage_rank_0 ( type(c_ptr), value  handle,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  nnz_a,
type(c_ptr), value  csr_descr_a,
real(c_float), target  csr_val_a,
integer(c_int), target  csr_row_ptr_a,
integer(c_int), target  csr_col_ind_a,
real(c_float)  percentage,
type(c_ptr), value  csr_descr_c,
integer(c_int), target  csr_row_ptr_c,
integer(c_int), target  nnz_total_dev_host_ptr,
type(c_ptr), value  myinfo,
type(c_ptr), value  temp_buffer 
)

◆ rocsparse_sprune_csr2csr_nnz_by_percentage_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sprune_csr2csr_nnz_by_percentage::rocsparse_sprune_csr2csr_nnz_by_percentage_rank_1 ( type(c_ptr), value  handle,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  nnz_a,
type(c_ptr), value  csr_descr_a,
real(c_float), dimension(:), target  csr_val_a,
integer(c_int), dimension(:), target  csr_row_ptr_a,
integer(c_int), dimension(:), target  csr_col_ind_a,
real(c_float)  percentage,
type(c_ptr), value  csr_descr_c,
integer(c_int), dimension(:), target  csr_row_ptr_c,
integer(c_int), target  nnz_total_dev_host_ptr,
type(c_ptr), value  myinfo,
type(c_ptr), value  temp_buffer 
)

◆ rocsparse_sprune_csr2csr_nnz_by_percentage_typed()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sprune_csr2csr_nnz_by_percentage::rocsparse_sprune_csr2csr_nnz_by_percentage_typed ( type(c_ptr), value  handle,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  nnz_a,
type(c_ptr), value  csr_descr_a,
type(c_ptr)  csr_val_a,
type(c_ptr)  csr_row_ptr_a,
type(c_ptr)  csr_col_ind_a,
real(c_float)  percentage,
type(c_ptr), value  csr_descr_c,
type(c_ptr)  csr_row_ptr_c,
integer(c_int), target  nnz_total_dev_host_ptr,
type(c_ptr), value  myinfo,
type(c_ptr), value  temp_buffer 
)

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