Skip to content
Snippets Groups Projects

Data-parallel multi-core RT codegen

Merged rarbore2 requested to merge multicore2 into main
8 files
+ 440
167
Compare changes
  • Side-by-side
  • Inline
Files
8
+ 17
10
@@ -3,11 +3,14 @@ use std::collections::{HashMap, HashSet};
use crate::*;
/*
* Construct a map from fork node to all control nodes (including itself) satisfying:
* a) domination by F
* b) no domination by F's join
* c) no domination by any other fork that's also dominated by F, where we do count self-domination
* Here too we include the non-fork start node, as key for all controls outside any fork.
* Construct a map from fork node to all control nodes (including itself)
* satisfying:
* 1. Dominated by the fork.
* 2. Not dominated by the fork's join.
* 3. Not dominated by any other fork that's also dominated by the fork, where
* we do count self-domination.
* We include the non-fork start node as the key for all control nodes outside
* any fork.
*/
pub fn fork_control_map(
fork_join_nesting: &HashMap<NodeID, Vec<NodeID>>,
@@ -23,11 +26,14 @@ pub fn fork_control_map(
fork_control_map
}
/* Construct a map from each fork node F to all forks satisfying:
* a) domination by F
* b) no domination by F's join
* c) no domination by any other fork that's also dominated by F, where we don't count self-domination
* Note that the fork_tree also includes the non-fork start node, as unique root node.
/*
* Construct a map from fork node to all fork nodes (including itself)
* satisfying:
* 1. Dominated by the fork.
* 2. Not dominated by the fork's join.
* 3. Not dominated by any other fork that's also dominated by the fork, where
* we do count self-domination.
* Note that the fork tree also includes the start node as the unique root node.
*/
pub fn fork_tree(
function: &Function,
@@ -44,5 +50,6 @@ pub fn fork_tree(
.insert(*control);
}
}
fork_tree.entry(NodeID::new(0)).or_default();
fork_tree
}
Loading