Skip to content
Snippets Groups Projects
Commit 3b1aa5d4 authored by Russel Arbore's avatar Russel Arbore
Browse files

parallelize main loop in bfs

parent f092ae38
No related branches found
No related tags found
2 merge requests!215Large benches,!214More optimizations
Pipeline #202011 passed
This commit is part of merge request !214. Comments created here will be created in the context of that merge request.
......@@ -10,13 +10,15 @@ macro simpl!(X) {
phi-elim(bfs);
no-memset(bfs@cost);
outline(bfs@cost_init);
let init = outline(bfs@cost_init);
let loop1 = outline(bfs@loop1);
let loop2 = outline(bfs@loop2);
parallel-reduce(loop1);
simpl!(*);
predication(*);
const-inline(*);
loop-bound-canon(*);
simpl!(*);
fixpoint {
forkify(*);
......@@ -26,5 +28,12 @@ simpl!(*);
predication(*);
simpl!(*);
unforkify(*);
fork-tile[32, 0, false, false](loop1);
let split = fork-split(loop1);
let out = outline(split.bfs_1.fj1);
unforkify(out);
inline(bfs@loop1);
delete-uncalled(*);
unforkify(init);
gcm(*);
......@@ -19,6 +19,7 @@ pub struct BFSInputs {
fn run_bfs(nodes: &[Node], source: u32, edges: &[u32]) -> Vec<i32> {
let n = nodes.len() as u64;
let m = edges.len() as u64;
println!("Running with {} nodes and {} edges.", n, m);
let nodes = HerculesImmBox::from(nodes);
let edges = HerculesImmBox::from(edges);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment