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 nintegers containing the permutation vector to inverse.[out] q - array of nintegers containing the invsrse of the permutation vector.[in] base - rocsparse_index_base_zeroorrocsparse_index_base_one.
- Return values
-
rocsparse_status_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_invalid_size nis invalid.rocsparse_status_invalid_pointer ppointer is invalid orqpointer is invalid.rocsparse_status_invalid_value baseis 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: