Trait Optimization

Source
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§

Source

fn execute( &mut self, context: &mut Context<'_, R::FusionHandle>, execution: &OrderedExecution<R>, )

Execute the operation.

Source

fn to_state(&self) -> R::OptimizationState

Returns the state that can be serialized.

Source

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.

Implementors§