Skip to content
Snippets Groups Projects

Rodinia benches

Merged rarbore2 requested to merge rodinia_benches into main
Files
5
+ 41
0
#![feature(concat_idents)]
use criterion::{criterion_group, criterion_main, Criterion};
use hercules_rt::{runner, HerculesImmBox, HerculesImmBoxTo};
juno_build::juno!("bfs");
use juno_bfs::graph_parser::*;
fn bfs_bench(c: &mut Criterion) {
let mut group = c.benchmark_group("bfs bench");
let mut r = runner!(bfs);
let input = "data/graph4096.txt";
let (nodes, source, edges) = parse_graph(input.into());
let n = nodes.len() as u64;
let m = edges.len() as u64;
let nodes = HerculesImmBox::from(&nodes as &[Node]);
let edges = HerculesImmBox::from(&edges as &[u32]);
group.bench_function("bfs bench 4096", |b| {
b.iter(|| {
async_std::task::block_on(async { r.run(n, m, nodes.to(), source, edges.to()).await });
})
});
let input = "data/graph65536.txt";
let (nodes, source, edges) = parse_graph(input.into());
let n = nodes.len() as u64;
let m = edges.len() as u64;
let nodes = HerculesImmBox::from(&nodes as &[Node]);
let edges = HerculesImmBox::from(&edges as &[u32]);
group.bench_function("bfs bench 65536", |b| {
b.iter(|| {
async_std::task::block_on(async { r.run(n, m, nodes.to(), source, edges.to()).await });
})
});
}
criterion_group!(benches, bfs_bench);
criterion_main!(benches);
Loading