pub struct ScatterPlan { /* private fields */ }Expand description
A compiled additive scatter traversal.
Execution first copies operand into dest, then applies additive updates
in deterministic column-major order. Boolean values are intentionally not
supported because additive scatter has no bool semantics.
Implementations§
Source§impl ScatterPlan
impl ScatterPlan
Sourcepub fn compile(
operand_dims: &[usize],
operand_strides: &[isize],
index_dims: &[usize],
index_strides: &[isize],
update_dims: &[usize],
update_strides: &[isize],
dest_dims: &[usize],
dest_strides: &[isize],
spec: ScatterSpec,
) -> Result<Self>
pub fn compile( operand_dims: &[usize], operand_strides: &[isize], index_dims: &[usize], index_strides: &[isize], update_dims: &[usize], update_strides: &[isize], dest_dims: &[usize], dest_strides: &[isize], spec: ScatterSpec, ) -> Result<Self>
Compile an additive scatter traversal.
Sourcepub fn execute<T, I>(
&self,
dest: &mut RawStridedMut<'_, T>,
operand: &RawStridedRef<'_, T>,
scatter_indices: &RawStridedRef<'_, I>,
updates: &RawStridedRef<'_, T>,
) -> Result<()>
pub fn execute<T, I>( &self, dest: &mut RawStridedMut<'_, T>, operand: &RawStridedRef<'_, T>, scatter_indices: &RawStridedRef<'_, I>, updates: &RawStridedRef<'_, T>, ) -> Result<()>
Execute the prepared additive scatter traversal.
Trait Implementations§
Source§impl Clone for ScatterPlan
impl Clone for ScatterPlan
Source§fn clone(&self) -> ScatterPlan
fn clone(&self) -> ScatterPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ScatterPlan
impl RefUnwindSafe for ScatterPlan
impl Send for ScatterPlan
impl Sync for ScatterPlan
impl Unpin for ScatterPlan
impl UnsafeUnpin for ScatterPlan
impl UnwindSafe for ScatterPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more