rocsparse_snnz_compress Interface Reference

rocsparse_snnz_compress Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_snnz_compress Interface Reference
hipfort_rocsparse::rocsparse_snnz_compress Interface Reference

Given a sparse CSR matrix and a non-negative tolerance, this function computes how many entries would be left in each row of the matrix if elements less than the tolerance were removed. More...

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_snnz_compress_ (handle, m, descr_a, csr_val_a, csr_row_ptr_a, nnz_per_row, nnz_c, tol)
 
integer(kind(rocsparse_status_success)) function rocsparse_snnz_compress_rank_0 (handle, m, descr_a, csr_val_a, csr_row_ptr_a, nnz_per_row, nnz_c, tol)
 
integer(kind(rocsparse_status_success)) function rocsparse_snnz_compress_rank_1 (handle, m, descr_a, csr_val_a, csr_row_ptr_a, nnz_per_row, nnz_c, tol)
 

Detailed Description

Given a sparse CSR matrix and a non-negative tolerance, this function computes how many entries would be left in each row of the matrix if elements less than the tolerance were removed.

It also computes the total number of remaining elements in the matrix.

Note
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]descr_A- the descriptor of the sparse CSR matrix.
[in]csr_val_A- array of nnz_A elements of the sparse CSR matrix.
[in]csr_row_ptr_A- array of m+1 elements that point to the start of every row of the uncompressed sparse CSR matrix.
[out]nnz_per_row- array of length m containing the number of entries that will be kept per row in the final compressed CSR matrix.
[out]nnz_C- number of elements in the column indices and values arrays of the compressed sparse CSR matrix. It can be either a host or device pointer.
[in]tol- the non-negative tolerance used for compression. If tol is complex, then only the magnitude of the real part is used. Entries in the input uncompressed CSR array that are below the tolerance are removed in the output compressed CSR matrix.
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizem or n is invalid.
rocsparse_status_invalid_valuetol is invalid.
rocsparse_status_invalid_pointercsr_val_A, csr_row_ptr_A, nnz_per_row, or nnz_C pointer is invalid.
Example

Member Function/Subroutine Documentation

◆ rocsparse_snnz_compress_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_snnz_compress::rocsparse_snnz_compress_ ( type(c_ptr), value  handle,
integer(c_int), value  m,
type(c_ptr), value  descr_a,
type(c_ptr), value  csr_val_a,
type(c_ptr), value  csr_row_ptr_a,
type(c_ptr), value  nnz_per_row,
type(c_ptr), value  nnz_c,
real(c_float), value  tol 
)

◆ rocsparse_snnz_compress_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_snnz_compress::rocsparse_snnz_compress_rank_0 ( type(c_ptr)  handle,
integer(c_int)  m,
type(c_ptr)  descr_a,
real(c_float), target  csr_val_a,
integer(c_int), target  csr_row_ptr_a,
integer(c_int), target  nnz_per_row,
integer(c_int), target  nnz_c,
real(c_float)  tol 
)

◆ rocsparse_snnz_compress_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_snnz_compress::rocsparse_snnz_compress_rank_1 ( type(c_ptr)  handle,
integer(c_int)  m,
type(c_ptr)  descr_a,
real(c_float), dimension(:), target  csr_val_a,
integer(c_int), dimension(:), target  csr_row_ptr_a,
integer(c_int), dimension(:), target  nnz_per_row,
integer(c_int), dimension(:), target  nnz_c,
real(c_float)  tol 
)

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