Skip to content

Commit 6c2e4d9

Browse files
committed
Fix benches
1 parent e15417d commit 6c2e4d9

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

splashsurf_lib/benches/benches/bench_full.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ pub fn surface_reconstruction_dam_break(c: &mut Criterion) {
105105
enable_simd: true,
106106
spatial_decomposition: SpatialDecomposition::None,
107107
global_neighborhood_list: false,
108+
kernel_type: splashsurf_lib::kernel::KernelType::CubicSpline,
108109
};
109110

110111
let mut group = c.benchmark_group("full surface reconstruction");
@@ -165,6 +166,7 @@ pub fn surface_reconstruction_double_dam_break(c: &mut Criterion) {
165166
enable_simd: true,
166167
spatial_decomposition: SpatialDecomposition::None,
167168
global_neighborhood_list: false,
169+
kernel_type: splashsurf_lib::kernel::KernelType::CubicSpline,
168170
};
169171

170172
let mut group = c.benchmark_group("full surface reconstruction");
@@ -225,6 +227,7 @@ pub fn surface_reconstruction_double_dam_break_inplace(c: &mut Criterion) {
225227
enable_simd: true,
226228
spatial_decomposition: SpatialDecomposition::None,
227229
global_neighborhood_list: false,
230+
kernel_type: splashsurf_lib::kernel::KernelType::CubicSpline,
228231
};
229232

230233
let mut group = c.benchmark_group("full surface reconstruction");

splashsurf_lib/benches/benches/bench_grid_loop.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ pub fn grid_loop_avx2(c: &mut Criterion) {
231231
#[cfg(all(target_feature = "avx2", target_feature = "fma"))]
232232
{
233233
let avx_result = unsafe {
234-
let kernel = CubicSplineKernel::new(params.compact_support_radius);
235234
let mut params = params.clone();
236235
dense_subdomains::density_grid_loop_avx(
237236
params.levelset_grid.as_mut_slice(),
@@ -243,7 +242,8 @@ pub fn grid_loop_avx2(c: &mut Criterion) {
243242
params.cube_radius,
244243
params.squared_support_with_margin,
245244
params.particle_rest_mass,
246-
&kernel,
245+
params.compact_support_radius,
246+
splashsurf_lib::kernel::KernelType::CubicSpline,
247247
);
248248
params.levelset_grid
249249
};
@@ -268,7 +268,6 @@ pub fn grid_loop_avx2(c: &mut Criterion) {
268268
unsafe {
269269
group.bench_function("grid_loop_avx2", |b| {
270270
b.iter(|| {
271-
let kernel = CubicSplineKernel::new(params.compact_support_radius);
272271
let mut params = params.clone();
273272
dense_subdomains::density_grid_loop_avx(
274273
params.levelset_grid.as_mut_slice(),
@@ -280,7 +279,8 @@ pub fn grid_loop_avx2(c: &mut Criterion) {
280279
params.cube_radius,
281280
params.squared_support_with_margin,
282281
params.particle_rest_mass,
283-
&kernel,
282+
params.compact_support_radius,
283+
splashsurf_lib::kernel::KernelType::CubicSpline,
284284
);
285285
})
286286
});

splashsurf_lib/benches/benches/bench_mesh.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ fn reconstruct_particles<P: AsRef<Path>>(particle_file: P) -> SurfaceReconstruct
2929
auto_disable: false,
3030
}),
3131
global_neighborhood_list: false,
32+
kernel_type: splashsurf_lib::kernel::KernelType::CubicSpline,
3233
};
3334

3435
reconstruct_surface::<i64, _>(particle_positions.as_slice(), &parameters).unwrap()

splashsurf_lib/benches/benches/bench_subdomain_grid.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ fn parameters_canyon() -> Parameters<f32> {
2828
auto_disable: false,
2929
}),
3030
global_neighborhood_list: false,
31+
kernel_type: splashsurf_lib::kernel::KernelType::CubicSpline,
3132
}
3233
}
3334

0 commit comments

Comments
 (0)