pub struct ErasedDynamicUpdateSlicePlan { /* private fields */ }Expand description
Dtype-erased dynamic-update-slice wrapper.
Implementations§
Source§impl ErasedDynamicUpdateSlicePlan
impl ErasedDynamicUpdateSlicePlan
Sourcepub fn compile(
dtype: KernelDType,
index_dtype: KernelDType,
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<Self>
pub fn compile( dtype: KernelDType, index_dtype: KernelDType, 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<Self>
Validate and store a dynamic-update-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) -> &DynamicUpdateSlicePlan
Sourcepub fn execute(
&self,
ctx: &ExecContext,
dest: &mut ErasedRawStridedMut<'_>,
operand: &ErasedRawStridedRef<'_>,
update: &ErasedRawStridedRef<'_>,
starts: &ErasedRawStridedRef<'_>,
) -> Result<()>
pub fn execute( &self, ctx: &ExecContext, dest: &mut ErasedRawStridedMut<'_>, operand: &ErasedRawStridedRef<'_>, update: &ErasedRawStridedRef<'_>, starts: &ErasedRawStridedRef<'_>, ) -> Result<()>
Execute a dynamic update slice into an erased output descriptor.
Sourcepub fn execute_uninit(
&self,
ctx: &ExecContext,
dest: &mut ErasedRawStridedUninitMut<'_>,
operand: &ErasedRawStridedPtr<'_>,
update: &ErasedRawStridedPtr<'_>,
starts: &ErasedRawStridedPtr<'_>,
) -> Result<()>
pub fn execute_uninit( &self, ctx: &ExecContext, dest: &mut ErasedRawStridedUninitMut<'_>, operand: &ErasedRawStridedPtr<'_>, update: &ErasedRawStridedPtr<'_>, starts: &ErasedRawStridedPtr<'_>, ) -> Result<()>
On success, the copy phase initializes every reachable destination slot before the read-modify-write phase. Unreachable holes are neither read nor initialized. Validation errors before the copy leave the destination untouched; an error or panic after the copy may leave a mixture of old and new reachable values, all initialized and safely droppable.
Trait Implementations§
Source§impl Clone for ErasedDynamicUpdateSlicePlan
impl Clone for ErasedDynamicUpdateSlicePlan
Source§fn clone(&self) -> ErasedDynamicUpdateSlicePlan
fn clone(&self) -> ErasedDynamicUpdateSlicePlan
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 ErasedDynamicUpdateSlicePlan
impl RefUnwindSafe for ErasedDynamicUpdateSlicePlan
impl Send for ErasedDynamicUpdateSlicePlan
impl Sync for ErasedDynamicUpdateSlicePlan
impl Unpin for ErasedDynamicUpdateSlicePlan
impl UnsafeUnpin for ErasedDynamicUpdateSlicePlan
impl UnwindSafe for ErasedDynamicUpdateSlicePlan
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