Skip to content

Commit 9fef8ae

Browse files
committed
Add warning for SIMD + non-f32
1 parent 18e7427 commit 9fef8ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

splashsurf_lib/src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,18 @@ pub fn reconstruct_surface_inplace<I: Index, R: Real>(
348348
utils::SimdFeatures::Avx2Fma => "AVX2 and FMA",
349349
utils::SimdFeatures::Neon => "NEON",
350350
};
351-
info!("Vectorization enabled with support detected for {simd_str}.");
351+
info!("Vectorization enabled with support detected for {simd_str} instructions.");
352352
} else {
353353
warn!(
354354
"Vectorization was enabled, but no SIMD support was detected on this CPU. Falling back to non-vectorized code."
355355
);
356356
}
357+
358+
if std::any::TypeId::of::<R>() != std::any::TypeId::of::<f32>() {
359+
warn!(
360+
"Vectorization is currently only supported for single-precision (f32) reconstructions. Falling back to non-vectorized code."
361+
);
362+
}
357363
}
358364

359365
// Filter out particles

0 commit comments

Comments
 (0)