pub struct PadPlan { /* private fields */ }Expand description
A compiled pad traversal.
Replay first fills every destination element with the caller-provided fill scalar, then copies reachable input positions into the padded output.
Implementations§
Source§impl PadPlan
impl PadPlan
Sourcepub fn compile(
operand_dims: &[usize],
operand_strides: &[isize],
dest_dims: &[usize],
dest_strides: &[isize],
edge_padding_low: &[i64],
edge_padding_high: &[i64],
interior_padding: &[i64],
) -> Result<Self>
pub fn compile( operand_dims: &[usize], operand_strides: &[isize], dest_dims: &[usize], dest_strides: &[isize], edge_padding_low: &[i64], edge_padding_high: &[i64], interior_padding: &[i64], ) -> Result<Self>
Compile a pad plan for one operand layout and destination layout.
Sourcepub fn execute<T>(
&self,
dest: &mut RawStridedMut<'_, T>,
operand: &RawStridedRef<'_, T>,
fill: T,
) -> Result<()>where
T: Copy + MaybeSendSync,
pub fn execute<T>(
&self,
dest: &mut RawStridedMut<'_, T>,
operand: &RawStridedRef<'_, T>,
fill: T,
) -> Result<()>where
T: Copy + MaybeSendSync,
Execute the prepared pad traversal.
Sourcepub fn execute_uninit<T>(
&self,
dest: &mut RawStridedMut<'_, MaybeUninit<T>>,
operand: &RawStridedRef<'_, T>,
fill: T,
) -> Result<()>where
T: Copy + MaybeSendSync,
pub fn execute_uninit<T>(
&self,
dest: &mut RawStridedMut<'_, MaybeUninit<T>>,
operand: &RawStridedRef<'_, T>,
fill: T,
) -> Result<()>where
T: Copy + MaybeSendSync,
Execute pad into storage whose reachable destination elements are uninitialized.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PadPlan
impl RefUnwindSafe for PadPlan
impl Send for PadPlan
impl Sync for PadPlan
impl Unpin for PadPlan
impl UnsafeUnpin for PadPlan
impl UnwindSafe for PadPlan
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