pub unsafe extern "C" fn cusparseScatter(
handle: cusparseHandle_t,
vecX: cusparseConstSpVecDescr_t,
vecY: cusparseDnVecDescr_t,
) -> cusparseStatus_tExpand description
The function scatters the elements of the sparse vector vecX into the dense vector vecY
In other words,
for i=0 to nnz-1
Y[X_indices[i]] = X_values[i]cusparseScatter supports the following index type for representing the sparse vector vecX:
- 32-bit indices (
cusparseIndexType_t::CUSPARSE_INDEX_32I) - 64-bit indices (
cusparseIndexType_t::CUSPARSE_INDEX_64I)
cusparseScatter supports the following data types:
cusparseScatter has the following constraints:
- The arrays representing the sparse vector
vecXmust be aligned to 16 bytes
cusparseScatter has the following properties:
- The routine requires no extra storage
- The routine supports asynchronous execution
- Provides deterministic (bit-wise) results for each run if the the sparse vector
vecXindices are distinct - The routine allows
indicesofvecXto be unsorted
cusparseScatter supports the following optimizations:
- CUDA graph capture
- Hardware Memory Compression
Please visit cuSPARSE Library Samples - cusparseScatter for a code example.
ยงParameters
handle: Handle to the cuSPARSE library context.vecX: Sparse vectorX.vecY: Dense vectorY.