pub struct DynamicUpdateSlicePlan { /* private fields */ }Expand description
A compiled dynamic-update-slice traversal.
Execution first copies operand into dest, then overwrites the clamped
update window. The plan performs no allocation for ranks at most
RAW_FUSED_RANK_LIMIT.
Implementations§
Source§impl DynamicUpdateSlicePlan
impl DynamicUpdateSlicePlan
Sourcepub fn compile(
operand_dims: &[usize],
operand_strides: &[isize],
start_dims: &[usize],
start_strides: &[isize],
update_dims: &[usize],
update_strides: &[isize],
dest_dims: &[usize],
dest_strides: &[isize],
) -> Result<DynamicUpdateSlicePlan, StridedError>
pub fn compile( operand_dims: &[usize], operand_strides: &[isize], start_dims: &[usize], start_strides: &[isize], update_dims: &[usize], update_strides: &[isize], dest_dims: &[usize], dest_strides: &[isize], ) -> Result<DynamicUpdateSlicePlan, StridedError>
Compile a dynamic-update-slice traversal.
dest_dims must match operand_dims; execution materializes
dest = operand and then overwrites the clamped update window.
Sourcepub fn execute<T, I>(
&self,
dest: &mut RawStridedMut<'_, T>,
operand: &RawStridedRef<'_, T>,
update: &RawStridedRef<'_, T>,
starts: &RawStridedRef<'_, I>,
) -> Result<(), StridedError>
pub fn execute<T, I>( &self, dest: &mut RawStridedMut<'_, T>, operand: &RawStridedRef<'_, T>, update: &RawStridedRef<'_, T>, starts: &RawStridedRef<'_, I>, ) -> Result<(), StridedError>
Execute the prepared dynamic-update-slice traversal.
Trait Implementations§
Source§impl Clone for DynamicUpdateSlicePlan
impl Clone for DynamicUpdateSlicePlan
Source§fn clone(&self) -> DynamicUpdateSlicePlan
fn clone(&self) -> DynamicUpdateSlicePlan
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 DynamicUpdateSlicePlan
impl RefUnwindSafe for DynamicUpdateSlicePlan
impl Send for DynamicUpdateSlicePlan
impl Sync for DynamicUpdateSlicePlan
impl Unpin for DynamicUpdateSlicePlan
impl UnsafeUnpin for DynamicUpdateSlicePlan
impl UnwindSafe for DynamicUpdateSlicePlan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more