pub struct ErasedDynamicSlicePlan { /* private fields */ }Expand description
Dtype-erased fixed-window dynamic-slice wrapper.
Implementations§
Source§impl ErasedDynamicSlicePlan
impl ErasedDynamicSlicePlan
Sourcepub fn compile(
dtype: KernelDType,
index_dtype: KernelDType,
operand_dims: &[usize],
operand_strides: &[isize],
start_dims: &[usize],
start_strides: &[isize],
dest_dims: &[usize],
dest_strides: &[isize],
slice_sizes: &[usize],
) -> Result<Self>
pub fn compile( dtype: KernelDType, index_dtype: KernelDType, operand_dims: &[usize], operand_strides: &[isize], start_dims: &[usize], start_strides: &[isize], dest_dims: &[usize], dest_strides: &[isize], slice_sizes: &[usize], ) -> Result<Self>
Validate and store a dynamic-slice plan for one value dtype, index dtype, and layout set.
pub fn dtype(&self) -> KernelDType
pub fn index_dtype(&self) -> KernelDType
pub fn plan(&self) -> &DynamicSlicePlan
Sourcepub fn execute(
&self,
ctx: &ExecContext,
dest: &mut ErasedRawStridedMut<'_>,
operand: &ErasedRawStridedRef<'_>,
starts: &ErasedRawStridedRef<'_>,
) -> Result<()>
pub fn execute( &self, ctx: &ExecContext, dest: &mut ErasedRawStridedMut<'_>, operand: &ErasedRawStridedRef<'_>, starts: &ErasedRawStridedRef<'_>, ) -> Result<()>
Execute a fixed-window dynamic slice into an erased output descriptor.
Sourcepub fn execute_uninit(
&self,
ctx: &ExecContext,
dest: &mut ErasedRawStridedUninitMut<'_>,
operand: &ErasedRawStridedPtr<'_>,
starts: &ErasedRawStridedPtr<'_>,
) -> Result<()>
pub fn execute_uninit( &self, ctx: &ExecContext, dest: &mut ErasedRawStridedUninitMut<'_>, operand: &ErasedRawStridedPtr<'_>, starts: &ErasedRawStridedPtr<'_>, ) -> Result<()>
Execute dynamic slice into a destination whose reachable slots may be
uninitialized.
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 reachable slots partially initialized, but the MaybeUninit
destination remains safely droppable.
Trait Implementations§
Source§impl Clone for ErasedDynamicSlicePlan
impl Clone for ErasedDynamicSlicePlan
Source§fn clone(&self) -> ErasedDynamicSlicePlan
fn clone(&self) -> ErasedDynamicSlicePlan
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 ErasedDynamicSlicePlan
impl RefUnwindSafe for ErasedDynamicSlicePlan
impl Send for ErasedDynamicSlicePlan
impl Sync for ErasedDynamicSlicePlan
impl Unpin for ErasedDynamicSlicePlan
impl UnsafeUnpin for ErasedDynamicSlicePlan
impl UnwindSafe for ErasedDynamicSlicePlan
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