hipsparsesprunecsr2csrnnz Interface Reference

hipsparsesprunecsr2csrnnz Interface Reference#

HIPFORT API Reference: hipfort_hipsparse::hipsparsesprunecsr2csrnnz Interface Reference
hipfort_hipsparse::hipsparsesprunecsr2csrnnz Interface Reference

Convert and prune sparse a CSR matrix into a sparse CSR matrix. More...

Public Member Functions

integer(kind(hipsparse_status_success)) function hipsparsesprunecsr2csrnnz_ (handle, m, n, nnza, descra, csrvala, csrrowptra, csrcolinda, threshold, descrc, csrrowptrc, nnztotaldevhostptr, buffer)
 
integer(kind(hipsparse_status_success)) function hipsparsesprunecsr2csrnnz_rank_0 (handle, m, n, nnza, descra, csrvala, csrrowptra, csrcolinda, threshold, descrc, csrrowptrc, nnztotaldevhostptr, buffer)
 
integer(kind(hipsparse_status_success)) function hipsparsesprunecsr2csrnnz_rank_1 (handle, m, n, nnza, descra, csrvala, csrrowptra, csrcolinda, threshold, descrc, csrrowptrc, nnztotaldevhostptr, buffer)
 

Detailed Description

Convert and prune sparse a CSR matrix into a sparse CSR matrix.

hipsparseXpruneCsr2csrNnz 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.
Parameters
[in]handle- handle to the hipSPARSE library context queue.
[in]m- number of rows in the sparse CSR matrix.
[in]n- number of columns in the sparse CSR matrix.
[in]nnzA- number of non-zeros in the sparse CSR matrix A.
[in]descrA- descriptor of the sparse CSR matrix A. Currently, only HIPSPARSE_MATRIX_TYPE_GENERAL is supported.
[in]csrValA- array of nnzA elements containing the values of the sparse CSR matrix A.
[in]csrRowPtrA- array of m+1 elements that point to the start of every row of the sparse CSR matrix A.
[in]csrColIndA- array of nnzA 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]descrC- descriptor of the sparse CSR matrix C. Currently, only HIPSPARSE_MATRIX_TYPE_GENERAL is supported.
[out]csrRowPtrC- array of m+1 elements that point to the start of every row of the sparse CSR matrix C.
[out]nnzTotalDevHostPtr- total number of nonzero elements in device or host memory.
[out]buffer- buffer allocated by the user whose size is determined by calling hipsparseSpruneCsr2csr_bufferSize "hipsparseXpruneCsr2csr_bufferSize()".
Return values
HIPSPARSE_STATUS_SUCCESSthe operation completed successfully.
HIPSPARSE_STATUS_INVALID_VALUEhandle, m, n, nnzA, threshold, descrA, descrC, csrValA, csrRowPtrA, csrColIndA, csrRowPtrC, nnzTotalDevHostPtr, or buffer pointer is invalid.

Member Function/Subroutine Documentation

◆ hipsparsesprunecsr2csrnnz_()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesprunecsr2csrnnz::hipsparsesprunecsr2csrnnz_ ( type(c_ptr), value  handle,
integer(c_int), value  m,
integer(c_int), value  n,
integer(c_int), value  nnza,
type(c_ptr), value  descra,
type(c_ptr), value  csrvala,
type(c_ptr), value  csrrowptra,
type(c_ptr), value  csrcolinda,
real(c_float)  threshold,
type(c_ptr), value  descrc,
type(c_ptr), value  csrrowptrc,
integer(c_int)  nnztotaldevhostptr,
type(c_ptr), value  buffer 
)

◆ hipsparsesprunecsr2csrnnz_rank_0()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesprunecsr2csrnnz::hipsparsesprunecsr2csrnnz_rank_0 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  nnza,
type(c_ptr)  descra,
real(c_float), target  csrvala,
integer(c_int), target  csrrowptra,
integer(c_int), target  csrcolinda,
real(c_float)  threshold,
type(c_ptr)  descrc,
integer(c_int), target  csrrowptrc,
integer(c_int)  nnztotaldevhostptr,
type(c_ptr)  buffer 
)

◆ hipsparsesprunecsr2csrnnz_rank_1()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsesprunecsr2csrnnz::hipsparsesprunecsr2csrnnz_rank_1 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  nnza,
type(c_ptr)  descra,
real(c_float), dimension(:), target  csrvala,
integer(c_int), dimension(:), target  csrrowptra,
integer(c_int), dimension(:), target  csrcolinda,
real(c_float)  threshold,
type(c_ptr)  descrc,
integer(c_int), dimension(:), target  csrrowptrc,
integer(c_int)  nnztotaldevhostptr,
type(c_ptr)  buffer 
)

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