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

parallelize cost init loop

parent 0107cc1c
No related branches found
No related tags found
1 merge request!216More optimizations
Pipeline #202056 failed
......@@ -24,7 +24,7 @@ fn bfs<n, m: usize>(graph_nodes: Node[n], source: u32, edges: u32[m]) -> i32[n]
@cost_init for i in 0..n {
cost[i] = -1;
}
cost[source as u64] = 0;
@cost_init cost[source as u64] = 0;
// Nodes that were updated in the current iteration
let updated: bool[n];
......
......@@ -48,10 +48,9 @@ let collect_body = outline(inner);
let init_body = init;
// Following code seems to generate breaking RT code
//fork-tile[32, 0, false, true](init);
//let (outer, inner) = fork-reshape[[1], [0]](init);
//let init_body = outline(inner);
//inline(bfs@cost_init);
fork-tile[32, 0, false, true](init);
let (outer, inner) = fork-reshape[[1], [0]](init);
let init_body = outline(inner);
inline(bfs@loop1, bfs@loop2);
delete-uncalled(*);
......
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