pub struct FusionPlan {
pub groups: Vec<FusionGroup>,
pub node_to_group: HashMap<NodeId, usize>,
}Expand description
The complete fusion plan produced by the fusion pass.
Fields§
§groups: Vec<FusionGroup>All fusion groups (including trivial single-node groups).
node_to_group: HashMap<NodeId, usize>Map from NodeId to the FusionGroup index it belongs to.
Implementations§
Source§impl FusionPlan
impl FusionPlan
Sourcepub fn fusion_count(&self) -> usize
pub fn fusion_count(&self) -> usize
Returns the number of non-trivial fusion groups (size ≥ 2).
Sourcepub fn nodes_saved(&self) -> usize
pub fn nodes_saved(&self) -> usize
Returns the total number of nodes saved by fusion.
Each non-trivial group of size k saves k-1 kernel launches.
Sourcepub fn group_of(&self, node: NodeId) -> Option<&FusionGroup>
pub fn group_of(&self, node: NodeId) -> Option<&FusionGroup>
Returns the fusion group that owns node.
Trait Implementations§
Source§impl Clone for FusionPlan
impl Clone for FusionPlan
Source§fn clone(&self) -> FusionPlan
fn clone(&self) -> FusionPlan
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FusionPlan
impl RefUnwindSafe for FusionPlan
impl Send for FusionPlan
impl Sync for FusionPlan
impl Unpin for FusionPlan
impl UnsafeUnpin for FusionPlan
impl UnwindSafe for FusionPlan
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