diff --git a/kifmm/benches/laplace_f32_amd.rs b/kifmm/benches/laplace_f32_amd.rs index 3409e18a..d7ee8c46 100644 --- a/kifmm/benches/laplace_f32_amd.rs +++ b/kifmm/benches/laplace_f32_amd.rs @@ -11,6 +11,10 @@ use kifmm::traits::tree::{SingleFmmTree, SingleTree}; use kifmm::tree::helpers::{points_fixture, points_fixture_oblate_spheroid, points_fixture_sphere}; use rlst::{rlst_dynamic_array2, RawAccess, RawAccessMut}; +fn configure_criterion() -> Criterion { + Criterion::default().sample_size(10) // Set global sample size to 10 +} + fn fft_f32(c: &mut Criterion) { let mut group = c.benchmark_group("F32 Potentials FFT-M2L"); @@ -230,5 +234,11 @@ fn blas_f32(c: &mut Criterion) { } } -criterion_group!(laplace_p_f32, fft_f32, blas_f32); -criterion_main!(laplace_p_f32); + +criterion_group! { + name = laplace_p_f32; + config = configure_criterion(); + targets = fft_f32, blas_f32 +} + +criterion_main!(laplace_p_f32); \ No newline at end of file diff --git a/kifmm/benches/laplace_f32_m1.rs b/kifmm/benches/laplace_f32_m1.rs index b362d1e5..a0863a4d 100644 --- a/kifmm/benches/laplace_f32_m1.rs +++ b/kifmm/benches/laplace_f32_m1.rs @@ -11,6 +11,10 @@ use kifmm::traits::tree::{SingleFmmTree, SingleTree}; use kifmm::tree::helpers::{points_fixture, points_fixture_oblate_spheroid, points_fixture_sphere}; use rlst::{rlst_dynamic_array2, RawAccess, RawAccessMut}; +fn configure_criterion() -> Criterion { + Criterion::default().sample_size(10) // Set global sample size to 10 +} + fn fft_f32(c: &mut Criterion) { let mut group = c.benchmark_group("F32 Potentials FFT-M2L"); @@ -226,5 +230,11 @@ fn blas_f32(c: &mut Criterion) { } } -criterion_group!(laplace_p_f32, fft_f32, blas_f32); + +criterion_group! { + name = laplace_p_f32; + config = configure_criterion(); + targets = fft_f32, blas_f32 +} + criterion_main!(laplace_p_f32); diff --git a/kifmm/benches/laplace_f64_amd.rs b/kifmm/benches/laplace_f64_amd.rs index 7a10a8f6..e4ff7e4d 100644 --- a/kifmm/benches/laplace_f64_amd.rs +++ b/kifmm/benches/laplace_f64_amd.rs @@ -11,6 +11,10 @@ use kifmm::traits::tree::{SingleFmmTree, SingleTree}; use kifmm::tree::helpers::{points_fixture, points_fixture_oblate_spheroid, points_fixture_sphere}; use rlst::{rlst_dynamic_array2, RawAccess, RawAccessMut}; +fn configure_criterion() -> Criterion { + Criterion::default().sample_size(10) // Set global sample size to 10 +} + fn fft_f64(c: &mut Criterion) { let mut group = c.benchmark_group("F64 Potentials FFT-M2L"); @@ -238,5 +242,10 @@ fn blas_f64(c: &mut Criterion) { } } -criterion_group!(laplace_p_f64, fft_f64, blas_f64); +criterion_group! { + name = laplace_p_f64; + config = configure_criterion(); + targets = fft_f64, blas_f64 +} + criterion_main!(laplace_p_f64); diff --git a/kifmm/benches/laplace_f64_m1.rs b/kifmm/benches/laplace_f64_m1.rs index 9c4b5edf..5ff5abc6 100644 --- a/kifmm/benches/laplace_f64_m1.rs +++ b/kifmm/benches/laplace_f64_m1.rs @@ -10,6 +10,11 @@ use kifmm::traits::tree::{SingleFmmTree, SingleTree}; use kifmm::tree::helpers::{points_fixture, points_fixture_oblate_spheroid, points_fixture_sphere}; use rlst::RawAccess; + +fn configure_criterion() -> Criterion { + Criterion::default().sample_size(10) // Set global sample size to 10 +} + fn fft_f64(c: &mut Criterion) { let mut group = c.benchmark_group("F64 Potentials FFT-M2L"); @@ -237,5 +242,10 @@ fn blas_f64(c: &mut Criterion) { } } -criterion_group!(laplace_p_f64, fft_f64, blas_f64); +criterion_group! { + name = laplace_p_f64; + config = configure_criterion(); + targets = fft_f64, blas_f64 +} + criterion_main!(laplace_p_f64);