pub struct GraphOptimizer<F: Float> { /* private fields */ }Expand description
Main graph optimizer
Implementations§
Source§impl<F: Float> GraphOptimizer<F>
impl<F: Float> GraphOptimizer<F>
Sourcepub fn with_config(config: OptimizationConfig) -> Self
pub fn with_config(config: OptimizationConfig) -> Self
Create a new graph optimizer with custom configuration
Sourcepub fn with_level(level: OptimizationLevel) -> Self
pub fn with_level(level: OptimizationLevel) -> Self
Create a new graph optimizer with specified optimization level
Sourcepub fn optimize(
&self,
graph: &Graph<F>,
) -> Result<OptimizationReport, OptimizationError>
pub fn optimize( &self, graph: &Graph<F>, ) -> Result<OptimizationReport, OptimizationError>
Optimize a computation graph
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for GraphOptimizer<F>
impl<F> RefUnwindSafe for GraphOptimizer<F>where
F: RefUnwindSafe,
impl<F> Send for GraphOptimizer<F>
impl<F> Sync for GraphOptimizer<F>
impl<F> Unpin for GraphOptimizer<F>where
F: Unpin,
impl<F> UnsafeUnpin for GraphOptimizer<F>
impl<F> UnwindSafe for GraphOptimizer<F>where
F: UnwindSafe,
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