pub struct ReductionFusionPlan {
pub groups: Vec<ReductionFusionGroup>,
pub node_to_group: HashMap<NodeId, usize>,
}Expand description
The complete reduction-fusion plan produced by analyse.
Fields§
§groups: Vec<ReductionFusionGroup>All matched reduction-fusion regions.
node_to_group: HashMap<NodeId, usize>Map from a region member NodeId to its group index.
Implementations§
Source§impl ReductionFusionPlan
impl ReductionFusionPlan
Sourcepub fn fusion_count(&self) -> usize
pub fn fusion_count(&self) -> usize
Returns the number of matched reduction regions.
Sourcepub fn nodes_saved(&self) -> usize
pub fn nodes_saved(&self) -> usize
Returns the total number of kernel launches eliminated across all regions.
Sourcepub fn group_of(&self, node: NodeId) -> Option<&ReductionFusionGroup>
pub fn group_of(&self, node: NodeId) -> Option<&ReductionFusionGroup>
Returns the region that owns node, if any.
Sourcepub fn is_absorbed(&self, node: NodeId) -> bool
pub fn is_absorbed(&self, node: NodeId) -> bool
Returns true if node was absorbed into a fused region but is not
that region’s root (i.e. it disappears as an independent launch).
Trait Implementations§
Source§impl Clone for ReductionFusionPlan
impl Clone for ReductionFusionPlan
Source§fn clone(&self) -> ReductionFusionPlan
fn clone(&self) -> ReductionFusionPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReductionFusionPlan
impl Debug for ReductionFusionPlan
Source§impl Default for ReductionFusionPlan
impl Default for ReductionFusionPlan
Source§fn default() -> ReductionFusionPlan
fn default() -> ReductionFusionPlan
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReductionFusionPlan
impl RefUnwindSafe for ReductionFusionPlan
impl Send for ReductionFusionPlan
impl Sync for ReductionFusionPlan
impl Unpin for ReductionFusionPlan
impl UnsafeUnpin for ReductionFusionPlan
impl UnwindSafe for ReductionFusionPlan
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