pub struct ErasedReversePlan { /* private fields */ }Expand description
Dtype-erased reverse wrapper.
Implementations§
Source§impl ErasedReversePlan
impl ErasedReversePlan
Sourcepub fn compile(
dtype: KernelDType,
operand_dims: &[usize],
operand_strides: &[isize],
dest_strides: &[isize],
axes: &[usize],
) -> Result<Self>
pub fn compile( dtype: KernelDType, operand_dims: &[usize], operand_strides: &[isize], dest_strides: &[isize], axes: &[usize], ) -> Result<Self>
Validate and store a reverse plan for one dtype and fixed layout set.
pub fn dtype(&self) -> KernelDType
pub fn plan(&self) -> &ReversePlan
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 reverse 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 reverse 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 ErasedReversePlan
impl Clone for ErasedReversePlan
Source§fn clone(&self) -> ErasedReversePlan
fn clone(&self) -> ErasedReversePlan
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 ErasedReversePlan
impl RefUnwindSafe for ErasedReversePlan
impl Send for ErasedReversePlan
impl Sync for ErasedReversePlan
impl Unpin for ErasedReversePlan
impl UnsafeUnpin for ErasedReversePlan
impl UnwindSafe for ErasedReversePlan
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