pub struct GraphOptimizer { /* private fields */ }Expand description
Graph optimizer that applies various optimization passes
Implementations§
Source§impl GraphOptimizer
impl GraphOptimizer
Sourcepub fn with_passes(passes: Vec<Box<dyn OptimizationPass>>) -> Self
pub fn with_passes(passes: Vec<Box<dyn OptimizationPass>>) -> Self
Create optimizer with custom passes
Sourcepub fn optimize(&self, graph: ComputationGraph) -> JitResult<ComputationGraph>
pub fn optimize(&self, graph: ComputationGraph) -> JitResult<ComputationGraph>
Apply all optimization passes to the graph
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphOptimizer
impl !RefUnwindSafe for GraphOptimizer
impl Send for GraphOptimizer
impl Sync for GraphOptimizer
impl Unpin for GraphOptimizer
impl UnsafeUnpin for GraphOptimizer
impl !UnwindSafe for GraphOptimizer
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