pub trait Optimization<R: FusionRuntime>: Send + NumOperations {
// Required methods
fn execute(
&mut self,
context: &mut Context<'_, R::FusionHandle>,
execution: &OrderedExecution<R>,
);
fn to_state(&self) -> R::OptimizationState;
fn from_state(device: &R::FusionDevice, state: R::OptimizationState) -> Self;
}
Expand description
The operation created from the builder.
Required Methods§
Sourcefn execute(
&mut self,
context: &mut Context<'_, R::FusionHandle>,
execution: &OrderedExecution<R>,
)
fn execute( &mut self, context: &mut Context<'_, R::FusionHandle>, execution: &OrderedExecution<R>, )
Execute the operation.
Sourcefn to_state(&self) -> R::OptimizationState
fn to_state(&self) -> R::OptimizationState
Returns the state that can be serialized.
Sourcefn from_state(device: &R::FusionDevice, state: R::OptimizationState) -> Self
fn from_state(device: &R::FusionDevice, state: R::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", so this trait is not object safe.