Trait Optimization
pub trait Optimization<R>: Send + NumOperationswhere
R: FusionRuntime,{
// Required methods
fn execute(
&mut self,
context: &mut Context<<R as FusionRuntime>::FusionHandle>,
execution: &OrderedExecution<R>,
);
fn to_state(&self) -> <R as FusionRuntime>::OptimizationState;
fn from_state(
device: &<R as FusionRuntime>::FusionDevice,
state: <R as FusionRuntime>::OptimizationState,
) -> Self;
}Expand description
The optimization created from a fuser.
Required Methods§
fn execute(
&mut self,
context: &mut Context<<R as FusionRuntime>::FusionHandle>,
execution: &OrderedExecution<R>,
)
fn execute( &mut self, context: &mut Context<<R as FusionRuntime>::FusionHandle>, execution: &OrderedExecution<R>, )
Execute the optimization.
fn to_state(&self) -> <R as FusionRuntime>::OptimizationState
fn to_state(&self) -> <R as FusionRuntime>::OptimizationState
Returns the state that can be serialized.
fn from_state(
device: &<R as FusionRuntime>::FusionDevice,
state: <R as FusionRuntime>::OptimizationState,
) -> Self
fn from_state( device: &<R as FusionRuntime>::FusionDevice, state: <R as FusionRuntime>::OptimizationState, ) -> Self
Create the optimization from the state.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".