rocsparse_coo2csr Interface Reference

rocsparse_coo2csr Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_coo2csr Interface Reference
hipfort_rocsparse::rocsparse_coo2csr Interface Reference

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

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_coo2csr_ (handle, coo_row_ind, nnz, m, csr_row_ptr, idx_base)
 
integer(kind(rocsparse_status_success)) function rocsparse_coo2csr_rank_0 (handle, coo_row_ind, nnz, m, csr_row_ptr, idx_base)
 
integer(kind(rocsparse_status_success)) function rocsparse_coo2csr_rank_1 (handle, coo_row_ind, nnz, m, csr_row_ptr, idx_base)
 

Detailed Description

Convert a sparse COO matrix into a sparse CSR matrix.

rocsparse_coo2csr converts the COO array containing the row indices into a CSR array of row offsets that point to the start of every row. It is assumed that the COO row index array is sorted.

rocsparse_coo2csr can also be used to convert a COO array containing the column indices into a CSC array of column offsets that point to the start of every column. In this case it is assumed that the COO column index array is sorted instead.

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]coo_row_ind- array of nnz elements containing the row indices of the sparse COO matrix.
[in]nnz- number of non-zero entries of the sparse CSR matrix.
[in]m- number of rows of the sparse CSR matrix.
[out]csr_row_ptr- array of m+1 elements that point to the start of every row of the sparse CSR 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_pointercoo_row_ind or csr_row_ptr pointer is invalid.
Example
This example converts a COO matrix into a CSR matrix.

Member Function/Subroutine Documentation

◆ rocsparse_coo2csr_()

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

◆ rocsparse_coo2csr_rank_0()

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

◆ rocsparse_coo2csr_rank_1()

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

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