rocsparse_sprune_csr2csr_nnz Interface Reference

rocsparse_sprune_csr2csr_nnz Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_sprune_csr2csr_nnz Interface Reference
hipfort_rocsparse::rocsparse_sprune_csr2csr_nnz Interface Reference

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_sprune_csr2csr_nnz_ (handle, m, n, nnz_a, csr_descr_a, csr_val_a, csr_row_ptr_a, csr_col_ind_a, threshold, csr_descr_c, csr_row_ptr_c, nnz_total_dev_host_ptr, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_sprune_csr2csr_nnz_rank_0 (handle, m, n, nnz_a, csr_descr_a, csr_val_a, csr_row_ptr_a, csr_col_ind_a, threshold, csr_descr_c, csr_row_ptr_c, nnz_total_dev_host_ptr, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_sprune_csr2csr_nnz_rank_1 (handle, m, n, nnz_a, csr_descr_a, csr_val_a, csr_row_ptr_a, csr_col_ind_a, threshold, csr_descr_c, csr_row_ptr_c, nnz_total_dev_host_ptr, temp_buffer)
 

Detailed Description

rocsparse_prune_csr2csr_nnz computes the number of non-zero elements per row and the total number of non-zero elements in a sparse CSR matrix after elements less than the threshold are pruned from the matrix.

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]threshold- pointer to the non-negative pruning threshold which can exist in either host or device memory.
[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.
[out]temp_buffer- buffer allocated by the user. Its size is determined by calling rocsparse_Xprune_csr2csr_buffer_size().
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizem, n, or nnz_A is invalid.
rocsparse_status_invalid_pointerthreshold, csr_descr_A, csr_descr_C, 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_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sprune_csr2csr_nnz::rocsparse_sprune_csr2csr_nnz_ ( 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)  threshold,
type(c_ptr), value  csr_descr_c,
type(c_ptr), value  csr_row_ptr_c,
integer(c_int)  nnz_total_dev_host_ptr,
type(c_ptr), value  temp_buffer 
)

◆ rocsparse_sprune_csr2csr_nnz_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sprune_csr2csr_nnz::rocsparse_sprune_csr2csr_nnz_rank_0 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  nnz_a,
type(c_ptr)  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)  threshold,
type(c_ptr)  csr_descr_c,
integer(c_int), target  csr_row_ptr_c,
integer(c_int)  nnz_total_dev_host_ptr,
type(c_ptr)  temp_buffer 
)

◆ rocsparse_sprune_csr2csr_nnz_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sprune_csr2csr_nnz::rocsparse_sprune_csr2csr_nnz_rank_1 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  nnz_a,
type(c_ptr)  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)  threshold,
type(c_ptr)  csr_descr_c,
integer(c_int), dimension(:), target  csr_row_ptr_c,
integer(c_int)  nnz_total_dev_host_ptr,
type(c_ptr)  temp_buffer 
)

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