pub struct GraphOptimizer { /* private fields */ }Expand description
Graph optimizer
Implementations§
Source§impl GraphOptimizer
impl GraphOptimizer
Sourcepub fn optimize(&mut self, graph: &mut ComputationGraph) -> Result<()>
pub fn optimize(&mut self, graph: &mut ComputationGraph) -> Result<()>
Apply all optimization passes
Sourcepub fn apply_constant_folding(
&mut self,
graph: &mut ComputationGraph,
) -> Result<()>
pub fn apply_constant_folding( &mut self, graph: &mut ComputationGraph, ) -> Result<()>
Apply constant folding optimization
Sourcepub fn apply_dead_code_elimination(
&mut self,
graph: &mut ComputationGraph,
) -> Result<()>
pub fn apply_dead_code_elimination( &mut self, graph: &mut ComputationGraph, ) -> Result<()>
Apply dead code elimination
Sourcepub fn apply_cse(&mut self, graph: &mut ComputationGraph) -> Result<()>
pub fn apply_cse(&mut self, graph: &mut ComputationGraph) -> Result<()>
Apply common subexpression elimination
Sourcepub fn apply_algebraic_simplification(
&mut self,
graph: &mut ComputationGraph,
) -> Result<()>
pub fn apply_algebraic_simplification( &mut self, graph: &mut ComputationGraph, ) -> Result<()>
Apply algebraic simplification
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GraphOptimizer
impl !UnwindSafe for GraphOptimizer
impl Freeze for GraphOptimizer
impl Send for GraphOptimizer
impl Sync for GraphOptimizer
impl Unpin for GraphOptimizer
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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