pub struct FusionEngine { /* private fields */ }Expand description
Fusion engine for optimizing computation graphs
Implementations§
Source§impl FusionEngine
impl FusionEngine
Sourcepub fn add_pattern(&mut self, pattern: FusionPattern)
pub fn add_pattern(&mut self, pattern: FusionPattern)
Add a fusion pattern
Sourcepub fn analyze(&mut self, graph: &ComputeGraph) -> Vec<FusionOpportunity>
pub fn analyze(&mut self, graph: &ComputeGraph) -> Vec<FusionOpportunity>
Analyze a compute graph and find fusion opportunities
Sourcepub fn fuse(
&mut self,
graph: &mut ComputeGraph,
opportunities: &[FusionOpportunity],
)
pub fn fuse( &mut self, graph: &mut ComputeGraph, opportunities: &[FusionOpportunity], )
Apply fusion to a graph
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FusionEngine
impl RefUnwindSafe for FusionEngine
impl Send for FusionEngine
impl Sync for FusionEngine
impl Unpin for FusionEngine
impl UnwindSafe for FusionEngine
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