Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
clbarnes committed Jan 23, 2024
1 parent 2e543fe commit 04b7129
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
1 change: 1 addition & 0 deletions nblast-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
//! // Create an arena to hold your neurons with this score function, and
//! // whether it should scale the dot products by the colinearity value.
//! let mut arena = NblastArena::new(smat, false);
//! // if the "parallel" feature is enabled, use e.g. `.with_threads(5)` to set 5 threads for multi-neuron queries
//!
//! let mut rng = fastrand::Rng::with_seed(1991);
//!
Expand Down
30 changes: 18 additions & 12 deletions spatial_bench/benches/spatial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,28 @@ pub fn bench_queries(c: &mut Criterion) {
});

let ar = make_arena::<KiddoArena>(points.clone());
group.bench_function("kiddo", |b| b.iter(|| {
pair_queries(&ar, &pairs);
black_box(())
}));
group.bench_function("kiddo", |b| {
b.iter(|| {
pair_queries(&ar, &pairs);
black_box(())
})
});

let ar = make_arena::<NaboArena>(points.clone());
group.bench_function("nabo", |b| b.iter(|| {
pair_queries(&ar, &pairs);
black_box(())
}));
group.bench_function("nabo", |b| {
b.iter(|| {
pair_queries(&ar, &pairs);
black_box(())
})
});

let ar = make_arena::<RstarArena>(points.clone());
group.bench_function("rstar", |b| b.iter(|| {
pair_queries(&ar, &pairs);
black_box(())
}));
group.bench_function("rstar", |b| {
b.iter(|| {
pair_queries(&ar, &pairs);
black_box(())
})
});
}

criterion_group!(benches, bench_construction, bench_queries);
Expand Down

0 comments on commit 04b7129

Please sign in to comment.