pub struct ReduceOptimization<R: Runtime> { /* private fields */ }
Implementations§
Source§impl<R: Runtime> ReduceOptimization<R>
impl<R: Runtime> ReduceOptimization<R>
pub fn new( trace: FuseTrace, trace_read_fallback: FuseTrace, trace_write_fallback: FuseTrace, client: ComputeClient<R::Server, R::Channel>, device: R::Device, len: usize, len_read: usize, reduce: FusedReduce, ) -> Self
Sourcepub fn execute<BT: CubeElement>(
&mut self,
context: &mut Context<'_, CubeFusionHandle<R>>,
fallback: impl FnOnce(usize) -> Box<dyn FallbackOperation<R>>,
)
pub fn execute<BT: CubeElement>( &mut self, context: &mut Context<'_, CubeFusionHandle<R>>, fallback: impl FnOnce(usize) -> Box<dyn FallbackOperation<R>>, )
Execute the optimization.
pub fn num_output_buffers(&self) -> usize
pub fn to_state(&self) -> ReduceOptimizationState
pub fn from_state(device: &R::Device, state: ReduceOptimizationState) -> Self
Sourcepub fn num_ops_fused(&self) -> usize
pub fn num_ops_fused(&self) -> usize
Returns the number of output buffers added by fusion.
Auto Trait Implementations§
impl<R> Freeze for ReduceOptimization<R>
impl<R> !RefUnwindSafe for ReduceOptimization<R>
impl<R> Send for ReduceOptimization<R>
impl<R> Sync for ReduceOptimization<R>
impl<R> Unpin for ReduceOptimization<R>
impl<R> !UnwindSafe for ReduceOptimization<R>
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
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>
Converts
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>
Converts
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