aboutsummaryrefslogtreecommitdiff
path: root/benches
diff options
context:
space:
mode:
authorJack O'Connor <[email protected]>2020-03-31 12:36:41 -0400
committerJack O'Connor <[email protected]>2020-04-01 19:13:15 -0400
commitb8cdcb1f84cf794c7072bbfaacac71f6a5857e3c (patch)
tree8c79aa18cf9ae1ee4908b88a546b4283646ca890 /benches
parenteec458d03ee7828225dda4f08138563d4ff8bb6d (diff)
automatically fall back to the pure Rust build
There are two scenarios where compiling AVX-512 C or assembly code might not work: 1. There might not be a C compiler installed at all. Most commonly this is either in cross-compiling situations, or with the Windows GNU target. 2. The installed C compiler might not support e.g. -mavx512f, because it's too old. In both of these cases, print a relevant warning, and then automatically fall back to using the pure Rust intrinsics build. Note that this only affects x86 targets. Other targets always use pure Rust, unless the "neon" feature is enabled.
Diffstat (limited to 'benches')
-rw-r--r--benches/bench.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/benches/bench.rs b/benches/bench.rs
index a6cd97a..782e06e 100644
--- a/benches/bench.rs
+++ b/benches/bench.rs
@@ -69,7 +69,7 @@ fn bench_single_compression_sse41(b: &mut Bencher) {
}
#[bench]
-#[cfg(not(feature = "pure"))]
+#[cfg(blake3_avx512_ffi)]
fn bench_single_compression_avx512(b: &mut Bencher) {
if let Some(platform) = Platform::avx512() {
bench_single_compression_fn(b, platform);
@@ -119,7 +119,7 @@ fn bench_many_chunks_avx2(b: &mut Bencher) {
}
#[bench]
-#[cfg(not(feature = "pure"))]
+#[cfg(blake3_avx512_ffi)]
fn bench_many_chunks_avx512(b: &mut Bencher) {
if let Some(platform) = Platform::avx512() {
bench_many_chunks_fn(b, platform);
@@ -178,7 +178,7 @@ fn bench_many_parents_avx2(b: &mut Bencher) {
}
#[bench]
-#[cfg(not(feature = "pure"))]
+#[cfg(blake3_avx512_ffi)]
fn bench_many_parents_avx512(b: &mut Bencher) {
if let Some(platform) = Platform::avx512() {
bench_many_parents_fn(b, platform);