rocsparse_gather Interface Reference#
hipfort_rocsparse::rocsparse_gather Interface Reference
Gather elements from a dense vector and store them in a sparse vector. More...
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_gather_ (handle, y, x) |
Detailed Description
Gather elements from a dense vector and store them in a sparse vector.
rocsparse_gather gathers the elements from the dense vector \(y\) and stores them in the sparse vector \(x\).
for(i = 0; i < nnz; ++i)
{
x_val[i] = y[x_ind[i]];
}
rocsparse_gather supports the following uniform-precision data types for the sparse and dense vectors x and y.
- Uniform Precisions:
-
Uniform Precisions X / Y rocsparse_datatype_i8_r rocsparse_datatype_f16_r rocsparse_datatype_bf16_r rocsparse_datatype_f32_r rocsparse_datatype_f64_r rocsparse_datatype_f32_c rocsparse_datatype_f64_c
- 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.
- This routine does not support batched computation.
- Parameters
-
[in] handle - handle to the rocSPARSE library context queue. [in] y - dense vector \(y\). [out] x - sparse vector \(x\).
- Return values
-
rocsparse_status_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_invalid_pointer xorypointer is invalid.
- Example
Member Function/Subroutine Documentation
◆ rocsparse_gather_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_gather::rocsparse_gather_ | ( | type(c_ptr), value | handle, |
| type(c_ptr), value | y, | ||
| type(c_ptr), value | x | ||
| ) |
The documentation for this interface was generated from the following file: