pub struct Plan { /* private fields */ }Expand description
A reusable index map and execution description, independent of buffer addresses.
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn new(operation: OperationDescriptor) -> Result<Self>
pub fn new(operation: OperationDescriptor) -> Result<Self>
Resolve free, broadcast, diagonal and reduction axes without executing a kernel.
pub fn operation(&self) -> &OperationDescriptor
pub fn reduction_extents(&self) -> &[usize]
pub fn reduction_elements(&self) -> usize
Sourcepub fn execute<R: Runtime>(
&self,
inputs: &[&RudaTensor<R>],
scalars: &[f64],
) -> Result<RudaTensor<R>>
pub fn execute<R: Runtime>( &self, inputs: &[&RudaTensor<R>], scalars: &[f64], ) -> Result<RudaTensor<R>>
Allocate D and enqueue the operation. All inputs remain unchanged.
Sourcepub fn execute_into<R: Runtime>(
&self,
inputs: &[&RudaTensor<R>],
output: RudaTensor<R>,
scalars: &[f64],
) -> Result<RudaTensor<R>>
pub fn execute_into<R: Runtime>( &self, inputs: &[&RudaTensor<R>], output: RudaTensor<R>, scalars: &[f64], ) -> Result<RudaTensor<R>>
Write into an exclusively owned D buffer and return it. D cannot alias any input.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnsafeUnpin for Plan
impl UnwindSafe for Plan
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