pub struct ErasedSlicePlan { /* private fields */ }Expand description
Dtype-erased static-slice wrapper.
Implementations§
Source§impl ErasedSlicePlan
impl ErasedSlicePlan
Sourcepub fn compile(
dtype: KernelDType,
operand_dims: &[usize],
operand_strides: &[isize],
dest_dims: &[usize],
dest_strides: &[isize],
starts: &[usize],
limits: &[usize],
slice_strides: &[usize],
) -> Result<Self>
pub fn compile( dtype: KernelDType, operand_dims: &[usize], operand_strides: &[isize], dest_dims: &[usize], dest_strides: &[isize], starts: &[usize], limits: &[usize], slice_strides: &[usize], ) -> Result<Self>
Validate and store a static slice plan for one dtype and fixed layout set.
pub fn dtype(&self) -> KernelDType
pub fn plan(&self) -> &SlicePlan
Sourcepub fn execute(
&self,
ctx: &ExecContext,
dest: &mut ErasedRawStridedMut<'_>,
operand: &ErasedRawStridedRef<'_>,
) -> Result<()>
pub fn execute( &self, ctx: &ExecContext, dest: &mut ErasedRawStridedMut<'_>, operand: &ErasedRawStridedRef<'_>, ) -> Result<()>
Execute a static slice into an erased output descriptor.
Sourcepub fn execute_uninit(
&self,
ctx: &ExecContext,
dest: &mut ErasedRawStridedUninitMut<'_>,
operand: &ErasedRawStridedPtr<'_>,
) -> Result<()>
pub fn execute_uninit( &self, ctx: &ExecContext, dest: &mut ErasedRawStridedUninitMut<'_>, operand: &ErasedRawStridedPtr<'_>, ) -> Result<()>
Execute a static slice as a full overwrite of uninitialized output storage.
On success, every reachable destination slot is fully overwritten;
unreachable holes are neither read nor initialized. Validation errors
are returned before any destination write. A panic during execution
may leave a partially initialized MaybeUninit destination, which is
still safely droppable; no readable value is promised for unwritten
reachable slots.
Trait Implementations§
Source§impl Clone for ErasedSlicePlan
impl Clone for ErasedSlicePlan
Source§fn clone(&self) -> ErasedSlicePlan
fn clone(&self) -> ErasedSlicePlan
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 ErasedSlicePlan
impl RefUnwindSafe for ErasedSlicePlan
impl Send for ErasedSlicePlan
impl Sync for ErasedSlicePlan
impl Unpin for ErasedSlicePlan
impl UnsafeUnpin for ErasedSlicePlan
impl UnwindSafe for ErasedSlicePlan
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