diff --git a/examples/rf_block.rs b/examples/rf_block.rs index e143a56..069db5b 100644 --- a/examples/rf_block.rs +++ b/examples/rf_block.rs @@ -83,7 +83,7 @@ fn main() { subgraph.connect(); - let block = ThrillerBlock::new( + let mut block = ThrillerBlock::new( vec![Rc::new(in_edge0), Rc::new(in_edge1)], vec![Rc::new(out_edge)], MemoryLevel::Register, @@ -91,6 +91,8 @@ fn main() { BlockType::Reduce, ); + block.merge_access_map(); + let code = block.emit().unwrap(); println!("{}", code); diff --git a/scripts/run_examples.sh b/scripts/run_examples.sh new file mode 100755 index 0000000..f6e3944 --- /dev/null +++ b/scripts/run_examples.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Run the examples in the examples directory +for file in $(find examples/ -name *.rs); do + unit=$(basename $file .rs) + make example EXAMPLE=$unit +done \ No newline at end of file