rocsparse_inverse_permutation Interface Reference

rocsparse_inverse_permutation Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_inverse_permutation Interface Reference
hipfort_rocsparse::rocsparse_inverse_permutation Interface Reference

Inverse a permutation vector. More...

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_inverse_permutation_ (handle, n, p, q, base)
 

Detailed Description

Inverse a permutation vector.

rocsparse_inverse_permutation computes

for(i = 0; i < n; ++i)
{
q[p[i]- base] = i + base;
}
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]n- size of the permutation vector p.
[in]p- array of n integers containing the permutation vector to inverse.
[out]q- array of n integers containing the invsrse of the permutation vector.
[in]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_sizen is invalid.
rocsparse_status_invalid_pointerp pointer is invalid or q pointer is invalid.
rocsparse_status_invalid_valuebase is invalid.

Member Function/Subroutine Documentation

◆ rocsparse_inverse_permutation_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_inverse_permutation::rocsparse_inverse_permutation_ ( type(c_ptr), value  handle,
integer(c_int), value  n,
type(c_ptr), value  p,
type(c_ptr), value  q,
integer(kind(rocsparse_index_base_zero)), value  base 
)

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