hipsparsexcsr2coo Interface Reference

hipsparsexcsr2coo Interface Reference#

HIPFORT API Reference: hipfort_hipsparse::hipsparsexcsr2coo Interface Reference
hipfort_hipsparse::hipsparsexcsr2coo Interface Reference

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

Public Member Functions

integer(kind(hipsparse_status_success)) function hipsparsexcsr2coo_ (handle, csrrowptr, nnz, m, coorowind, idxbase)
 
integer(kind(hipsparse_status_success)) function hipsparsexcsr2coo_rank_0 (handle, csrrowptr, nnz, m, coorowind, idxbase)
 
integer(kind(hipsparse_status_success)) function hipsparsexcsr2coo_rank_1 (handle, csrrowptr, nnz, m, coorowind, idxbase)
 

Detailed Description

Convert a sparse CSR matrix into a sparse COO matrix.

hipsparseXcsr2coo converts the CSR array containing the row offsets that point to the start of every row into a COO array of row indices. All arrays are assumed to be allocated by the user prior to calling hipsparseXcsr2coo.

For example, given the CSR row pointer array (assuming zero index base):

\[ \begin{align} \text{csrRowPtr} &= \begin{bmatrix} 0 & 1 & 3 & 4 \end{bmatrix} \end{align} \]

Calling hipsparseXcsr2coo results in the COO row indices array:

\[ \begin{align} \text{cooRowInd} &= \begin{bmatrix} 0 & 1 & 1 & 2 \end{bmatrix} \end{align} \]

Note
This function can also be used to convert a CSC array containing the column offsets into a COO array of column indices.
This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
Parameters
[in]handle- handle to the hipSPARSE library context queue.
[in]csrRowPtr- array of m+1 elements that point to the start of every row of the sparse CSR matrix.
[in]nnz- number of non-zero entries of the sparse CSR matrix. Must be non-negative.
[in]m- number of rows of the sparse CSR matrix. Must be non-negative.
[out]cooRowInd- array of nnz elements containing the row indices of the sparse COO matrix.
[in]idxBase- index base. HIPSPARSE_INDEX_BASE_ZERO for zero-based indexing or HIPSPARSE_INDEX_BASE_ONE for one-based indexing.
Return values
HIPSPARSE_STATUS_SUCCESSthe operation completed successfully.
HIPSPARSE_STATUS_NOT_INITIALIZEDhandle is not initialized.
HIPSPARSE_STATUS_INVALID_VALUEhandle is nullptr, m or, nnz is negative, csrRowPtr or cooRowInd is nullptr when nnz is greater than zero, or idxBase is neither HIPSPARSE_INDEX_BASE_ZERO nor HIPSPARSE_INDEX_BASE_ONE.
HIPSPARSE_STATUS_ARCH_MISMATCHthe device is not supported.

Member Function/Subroutine Documentation

◆ hipsparsexcsr2coo_()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsexcsr2coo::hipsparsexcsr2coo_ ( type(c_ptr), value  handle,
type(c_ptr), value  csrrowptr,
integer(c_int), value  nnz,
integer(c_int), value  m,
type(c_ptr), value  coorowind,
integer(kind(hipsparse_index_base_zero)), value  idxbase 
)

◆ hipsparsexcsr2coo_rank_0()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsexcsr2coo::hipsparsexcsr2coo_rank_0 ( type(c_ptr)  handle,
integer(c_int), target  csrrowptr,
integer(c_int)  nnz,
integer(c_int)  m,
integer(c_int), target  coorowind,
integer(kind(hipsparse_index_base_zero))  idxbase 
)

◆ hipsparsexcsr2coo_rank_1()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsexcsr2coo::hipsparsexcsr2coo_rank_1 ( type(c_ptr)  handle,
integer(c_int), dimension(:), target  csrrowptr,
integer(c_int)  nnz,
integer(c_int)  m,
integer(c_int), dimension(:), target  coorowind,
integer(kind(hipsparse_index_base_zero))  idxbase 
)

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