pub struct SlicePlan { /* private fields */ }Expand description
A compiled static-slice traversal.
compile validates the fixed starts/limits/slice_strides contract and
lowers replay to a strided copy from the corresponding source view.
Implementations§
Source§impl SlicePlan
impl SlicePlan
Sourcepub fn compile(
operand_dims: &[usize],
operand_strides: &[isize],
dest_dims: &[usize],
dest_strides: &[isize],
starts: &[usize],
limits: &[usize],
slice_strides: &[usize],
) -> Result<Self>
pub fn compile( operand_dims: &[usize], operand_strides: &[isize], dest_dims: &[usize], dest_strides: &[isize], starts: &[usize], limits: &[usize], slice_strides: &[usize], ) -> Result<Self>
Compile a static slice plan for one operand layout and destination layout.
Sourcepub fn execute<T>(
&self,
dest: &mut RawStridedMut<'_, T>,
operand: &RawStridedRef<'_, T>,
) -> Result<()>where
T: Copy + MaybeSendSync,
pub fn execute<T>(
&self,
dest: &mut RawStridedMut<'_, T>,
operand: &RawStridedRef<'_, T>,
) -> Result<()>where
T: Copy + MaybeSendSync,
Execute the prepared static slice traversal.
Sourcepub fn execute_uninit<T>(
&self,
dest: &mut RawStridedMut<'_, MaybeUninit<T>>,
operand: &RawStridedRef<'_, T>,
) -> Result<()>where
T: Copy + MaybeSendSync,
pub fn execute_uninit<T>(
&self,
dest: &mut RawStridedMut<'_, MaybeUninit<T>>,
operand: &RawStridedRef<'_, T>,
) -> Result<()>where
T: Copy + MaybeSendSync,
Execute into storage whose reachable destination elements are uninitialized.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SlicePlan
impl RefUnwindSafe for SlicePlan
impl Send for SlicePlan
impl Sync for SlicePlan
impl Unpin for SlicePlan
impl UnsafeUnpin for SlicePlan
impl UnwindSafe for SlicePlan
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