pub struct WriteSliceDescriptor<const N: usize> {
pub dest_shape: [i32; N],
pub source_shape: [i32; N],
pub ranges: [(i32, i32); N],
pub element: ElementKind,
}Expand description
Descriptor for a write_slice op.
dest_shape[d] is the per-axis extent of the destination tensor.
source_shape[d] must equal ranges[d].1 - ranges[d].0 for every
axis (the slab extent). ranges[d] = (start, end) selects the
inclusive-start / exclusive-end window on axis d.
element is the logical element kind of both tensors (they share
dtype). Used to drive byte-width / nibble dispatch.
Fields§
§dest_shape: [i32; N]Shape of the destination tensor.
source_shape: [i32; N]Shape of the source tensor (== ranges[i].1 - ranges[i].0
per axis).
ranges: [(i32, i32); N]Per-axis (start, end) window. 0 ≤ start ≤ end ≤ dest_shape[d].
element: ElementKindElement kind of both tensors. Used to compute the byte width (and to detect S4 / U4 for the nibble path).
Trait Implementations§
Source§impl<const N: usize> Clone for WriteSliceDescriptor<N>
impl<const N: usize> Clone for WriteSliceDescriptor<N>
Source§fn clone(&self) -> WriteSliceDescriptor<N>
fn clone(&self) -> WriteSliceDescriptor<N>
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 moreimpl<const N: usize> Copy for WriteSliceDescriptor<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for WriteSliceDescriptor<N>
impl<const N: usize> RefUnwindSafe for WriteSliceDescriptor<N>
impl<const N: usize> Send for WriteSliceDescriptor<N>
impl<const N: usize> Sync for WriteSliceDescriptor<N>
impl<const N: usize> Unpin for WriteSliceDescriptor<N>
impl<const N: usize> UnsafeUnpin for WriteSliceDescriptor<N>
impl<const N: usize> UnwindSafe for WriteSliceDescriptor<N>
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