rocsparse_cscsort Interface Reference

rocsparse_cscsort Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_cscsort Interface Reference
hipfort_rocsparse::rocsparse_cscsort Interface Reference

Sort a sparse CSC matrix. More...

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_cscsort_ (handle, m, n, nnz, descr, csc_col_ptr, csc_row_ind, perm, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_cscsort_rank_0 (handle, m, n, nnz, descr, csc_col_ptr, csc_row_ind, perm, temp_buffer)
 
integer(kind(rocsparse_status_success)) function rocsparse_cscsort_rank_1 (handle, m, n, nnz, descr, csc_col_ptr, csc_row_ind, perm, temp_buffer)
 

Detailed Description

Sort a sparse CSC matrix.

rocsparse_cscsort sorts a matrix in CSC format. The sorted permutation vector perm can be used to obtain the sorted csc_val array. In this case, perm must be initialized as the identity permutation. For more information, see rocsparse_create_identity_permutation ().

rocsparse_cscsort requires an extra temporary storage buffer that has to be allocated by the user. The storage buffer size can be determined by rocsparse_cscsort_buffer_size().

Note
perm can be NULL if a sorted permutation vector is not required.
This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
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 CSC matrix.
[in]n- number of columns of the sparse CSC matrix.
[in]nnz- number of non-zero entries of the sparse CSC matrix.
[in]descr- descriptor of the sparse CSC matrix. Currently, only rocsparse_matrix_type_general is supported.
[in]csc_col_ptr- array of n+1 elements that point to the start of every column of the sparse CSC matrix.
[in,out]csc_row_ind- array of nnz elements containing the row indices of the sparse CSC matrix.
[in,out]perm- array of nnz integers containing the unsorted map indices, which can be NULL.
[in]temp_buffer- temporary storage buffer allocated by the user. The size is returned by rocsparse_cscsort_buffer_size().
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizem, n, or nnz is invalid.
rocsparse_status_invalid_pointerdescr, csc_col_ptr, csc_row_ind, or temp_buffer pointer is invalid.
rocsparse_status_internal_erroran internal error occurred.
rocsparse_status_not_implementedrocsparse_matrix_type != rocsparse_matrix_type_general.
Example
The following example sorts a \(3 \times 3\) CSC matrix.

Member Function/Subroutine Documentation

◆ rocsparse_cscsort_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_cscsort::rocsparse_cscsort_ ( type(c_ptr), value  handle,
integer(c_int), value  m,
integer(c_int), value  n,
integer(c_int), value  nnz,
type(c_ptr), value  descr,
type(c_ptr), value  csc_col_ptr,
type(c_ptr), value  csc_row_ind,
type(c_ptr), value  perm,
type(c_ptr), value  temp_buffer 
)

◆ rocsparse_cscsort_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_cscsort::rocsparse_cscsort_rank_0 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  nnz,
type(c_ptr)  descr,
integer(c_int), target  csc_col_ptr,
integer(c_int), target  csc_row_ind,
integer(c_int), target  perm,
type(c_ptr)  temp_buffer 
)

◆ rocsparse_cscsort_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_cscsort::rocsparse_cscsort_rank_1 ( type(c_ptr)  handle,
integer(c_int)  m,
integer(c_int)  n,
integer(c_int)  nnz,
type(c_ptr)  descr,
integer(c_int), dimension(:), target  csc_col_ptr,
integer(c_int), dimension(:), target  csc_row_ind,
integer(c_int), dimension(:), target  perm,
type(c_ptr)  temp_buffer 
)

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