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<ConcatenatePlan, StridedError>
pub fn compile( input_dims: &[&[usize]], input_strides: &[&[isize]], dest_dims: &[usize], dest_strides: &[isize], axis: usize, ) -> Result<ConcatenatePlan, StridedError>
Compile a multi-input concatenate plan for fixed input and destination layouts.
Sourcepub fn execute<T>(
&self,
dest: &mut RawStridedMut<'_, T>,
inputs: &[RawStridedRef<'_, T>],
exec: Exec<'_>,
) -> Result<(), StridedError>
pub fn execute<T>( &self, dest: &mut RawStridedMut<'_, T>, inputs: &[RawStridedRef<'_, T>], exec: Exec<'_>, ) -> Result<(), StridedError>
Execute the prepared concatenate traversal.
Sourcepub fn execute_uninit<T>(
&self,
dest: &mut RawStridedMut<'_, MaybeUninit<T>>,
inputs: &[RawStridedRef<'_, T>],
exec: Exec<'_>,
) -> Result<(), StridedError>
pub fn execute_uninit<T>( &self, dest: &mut RawStridedMut<'_, MaybeUninit<T>>, inputs: &[RawStridedRef<'_, T>], exec: Exec<'_>, ) -> Result<(), StridedError>
Execute concatenate into storage whose reachable destination elements are uninitialized.
Trait Implementations§
Source§impl Clone for ConcatenatePlan
impl Clone for ConcatenatePlan
Source§fn clone(&self) -> ConcatenatePlan
fn clone(&self) -> ConcatenatePlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ConcatenatePlan
impl RefUnwindSafe for ConcatenatePlan
impl Send for ConcatenatePlan
impl Sync for ConcatenatePlan
impl Unpin for ConcatenatePlan
impl UnsafeUnpin for ConcatenatePlan
impl UnwindSafe for ConcatenatePlan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more