pub struct ConcatenatePlan { /* private fields */ }Expand description
A compiled multi-input concatenate traversal.
Each input segment is lowered to a prepared strided copy into the
corresponding destination window. The per-input collections are inline up
to OPERAND_CAP slots (destination plus four
inputs), so a bounded concatenate compiles and executes without touching the
heap; above that bound they spill gracefully. segment_starts carries one
more entry than there are inputs (the input_count + 1 prefix-sum sentinel
whose last entry is the destination total), which is why its bound is the
same operand cap.
Implementations§
Source§impl ConcatenatePlan
impl ConcatenatePlan
Sourcepub fn compile(
input_dims: &[&[usize]],
input_strides: &[&[isize]],
dest_dims: &[usize],
dest_strides: &[isize],
axis: usize,
) -> Result<Self>
pub fn compile( input_dims: &[&[usize]], input_strides: &[&[isize]], dest_dims: &[usize], dest_strides: &[isize], axis: usize, ) -> Result<Self>
Compile a multi-input concatenate plan for fixed input and destination layouts.
Sourcepub fn execute<T>(
&self,
dest: &mut RawStridedMut<'_, T>,
inputs: &[RawStridedRef<'_, T>],
) -> Result<()>where
T: Copy + MaybeSendSync,
pub fn execute<T>(
&self,
dest: &mut RawStridedMut<'_, T>,
inputs: &[RawStridedRef<'_, T>],
) -> Result<()>where
T: Copy + MaybeSendSync,
Execute the prepared concatenate traversal.
Sourcepub fn execute_uninit<T>(
&self,
dest: &mut RawStridedMut<'_, MaybeUninit<T>>,
inputs: &[RawStridedRef<'_, T>],
) -> Result<()>where
T: Copy + MaybeSendSync,
pub fn execute_uninit<T>(
&self,
dest: &mut RawStridedMut<'_, MaybeUninit<T>>,
inputs: &[RawStridedRef<'_, T>],
) -> Result<()>where
T: Copy + MaybeSendSync,
Execute concatenate into storage whose reachable destination elements are uninitialized.