rocsparse_csr2coo Interface Reference

rocsparse_csr2coo Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_csr2coo Interface Reference
hipfort_rocsparse::rocsparse_csr2coo Interface Reference

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

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_csr2coo_ (handle, csr_row_ptr, nnz, m, coo_row_ind, idx_base)
 
integer(kind(rocsparse_status_success)) function rocsparse_csr2coo_rank_0 (handle, csr_row_ptr, nnz, m, coo_row_ind, idx_base)
 
integer(kind(rocsparse_status_success)) function rocsparse_csr2coo_rank_1 (handle, csr_row_ptr, nnz, m, coo_row_ind, idx_base)
 

Detailed Description

Convert a sparse CSR matrix into a sparse COO matrix.

rocsparse_csr2coo converts the CSR array containing the row offsets that point to the start of every row into a COO array of row indices.

rocsparse_csr2coo can also be used to convert a CSC array containing the column offsets into a COO array of column indices.

Note
This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
This routine supports execution in a hipGraph context.
Parameters
[in]handle- handle to the rocSPARSE library context queue.
[in]csr_row_ptr- 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.
[in]m- number of rows of the sparse CSR matrix.
[out]coo_row_ind- array of nnz elements containing the row indices of the sparse COO matrix.
[in]idx_base- rocsparse_index_base_zero or rocsparse_index_base_one.
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizem or nnz is invalid.
rocsparse_status_invalid_pointercsr_row_ptr or coo_row_ind pointer is invalid.
rocsparse_status_arch_mismatchthe device is not supported.
Example
This example converts a CSR matrix into a COO matrix.

Member Function/Subroutine Documentation

◆ rocsparse_csr2coo_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2coo::rocsparse_csr2coo_ ( type(c_ptr), value  handle,
type(c_ptr), value  csr_row_ptr,
integer(c_int), value  nnz,
integer(c_int), value  m,
type(c_ptr), value  coo_row_ind,
integer(kind(rocsparse_index_base_zero)), value  idx_base 
)

◆ rocsparse_csr2coo_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2coo::rocsparse_csr2coo_rank_0 ( type(c_ptr)  handle,
integer(c_int), target  csr_row_ptr,
integer(c_int)  nnz,
integer(c_int)  m,
integer(c_int), target  coo_row_ind,
integer(kind(rocsparse_index_base_zero))  idx_base 
)

◆ rocsparse_csr2coo_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2coo::rocsparse_csr2coo_rank_1 ( type(c_ptr)  handle,
integer(c_int), dimension(:), target  csr_row_ptr,
integer(c_int)  nnz,
integer(c_int)  m,
integer(c_int), dimension(:), target  coo_row_ind,
integer(kind(rocsparse_index_base_zero))  idx_base 
)

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