pub struct GatherPlan { /* private fields */ }Expand description
A compiled gather traversal for one value layout, index layout, and output layout.
Implementations§
Source§impl GatherPlan
impl GatherPlan
Sourcepub fn compile(
operand_dims: &[usize],
operand_strides: &[isize],
index_dims: &[usize],
index_strides: &[isize],
dest_dims: &[usize],
dest_strides: &[isize],
spec: GatherSpec,
) -> Result<Self>
pub fn compile( operand_dims: &[usize], operand_strides: &[isize], index_dims: &[usize], index_strides: &[isize], dest_dims: &[usize], dest_strides: &[isize], spec: GatherSpec, ) -> Result<Self>
Compile a gather plan for fixed operand, index, and destination layouts.
pub fn spec(&self) -> &GatherSpec
pub fn dest_dims(&self) -> &[usize]
Sourcepub fn execute<T, I>(
&self,
dest: &mut RawStridedMut<'_, T>,
operand: &RawStridedRef<'_, T>,
start_indices: &RawStridedRef<'_, I>,
) -> Result<()>
pub fn execute<T, I>( &self, dest: &mut RawStridedMut<'_, T>, operand: &RawStridedRef<'_, T>, start_indices: &RawStridedRef<'_, I>, ) -> Result<()>
Execute the prepared gather traversal.
Trait Implementations§
Source§impl Clone for GatherPlan
impl Clone for GatherPlan
Source§fn clone(&self) -> GatherPlan
fn clone(&self) -> GatherPlan
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 GatherPlan
impl RefUnwindSafe for GatherPlan
impl Send for GatherPlan
impl Sync for GatherPlan
impl Unpin for GatherPlan
impl UnsafeUnpin for GatherPlan
impl UnwindSafe for GatherPlan
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