Skip to main content

scatter

Function scatter 

Source
pub fn scatter(
    ctx: &Context,
    sparse_vector: &SparseVectorDescriptor<'_>,
    dense_vector: &mut DenseVectorDescriptor<'_>,
) -> Result<()>
Expand description

Scatters the elements of sparse_vector into dense_vector.

In other words,

for i=0 to nnz-1
dense_values[sparse_indices[i]] = sparse_values[i]

scatter supports the following index type for representing sparse_vector:

scatter supports the following data types:

scatter has the following constraints:

  • The arrays representing sparse_vector must be aligned to 16 bytes.

scatter has the following properties:

  • Requires no extra storage.
  • Supports asynchronous execution.
  • Provides deterministic (bitwise) results for each run if sparse_vector indices are distinct.
  • Allows the indices of sparse_vector to be unsorted.

scatter supports the following optimizations:

  • CUDA graph capture.
  • Hardware Memory Compression.