rocsparse_create_identity_permutation Interface Reference

rocsparse_create_identity_permutation Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_create_identity_permutation Interface Reference
hipfort_rocsparse::rocsparse_create_identity_permutation Interface Reference

Create the identity map. More...

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_create_identity_permutation_ (handle, n, p)
 
integer(kind(rocsparse_status_success)) function rocsparse_create_identity_permutation_rank_0 (handle, n, p)
 
integer(kind(rocsparse_status_success)) function rocsparse_create_identity_permutation_rank_1 (handle, n, p)
 

Detailed Description

Create the identity map.

rocsparse_create_identity_permutation stores the identity map in p, such that \(p = 0:1:(n-1)\).

for(i = 0; i < n; ++i)
{
p[i] = i;
}
Note
This function is non blocking and executed asynchronously with respect to the host. It may return before the actual computation has finished.
Parameters
[in]handlehandle to the rocsparse library context queue.
[in]nsize of the map p.
[out]parray of n integers containing the map.
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.
Example
The following example creates an identity permutation.
rocsparse_int size = 200;
/ Allocate memory to hold the identity map
rocsparse_int* perm;
hipMalloc((void**)&perm, sizeof(rocsparse_int) * size);
/ Fill perm with the identity permutation
rocsparse_create_identity_permutation(handle, size, perm);
@ memory
Definition: hipfort_enums.f:50
@ to
Definition: hipfort_enums.f:49
@ the
Definition: hipfort_enums.f:49

Member Function/Subroutine Documentation

◆ rocsparse_create_identity_permutation_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_create_identity_permutation::rocsparse_create_identity_permutation_ ( type(c_ptr), value  handle,
integer(c_int), value  n,
type(c_ptr), value  p 
)

◆ rocsparse_create_identity_permutation_rank_0()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_create_identity_permutation::rocsparse_create_identity_permutation_rank_0 ( type(c_ptr)  handle,
integer(c_int)  n,
integer(c_int), target  p 
)

◆ rocsparse_create_identity_permutation_rank_1()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_create_identity_permutation::rocsparse_create_identity_permutation_rank_1 ( type(c_ptr)  handle,
integer(c_int)  n,
integer(c_int), dimension(:), target  p 
)

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