From 1afddf9d9b76ad9c9193a3f0ca126049942e2ba1 Mon Sep 17 00:00:00 2001 From: zachs18 <8355914+zachs18@users.noreply.github.com> Date: Wed, 7 Feb 2024 18:45:17 -0600 Subject: [PATCH] Under `features = ["nightly_stdsimd"]`, only enable `stdarch_x86_avx512` feature on x86 or x86_64 targets. (#225) --- src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 68dbabf..a810bb4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,13 @@ #![allow(clippy::uninlined_format_args)] #![cfg_attr(feature = "nightly_docs", feature(doc_cfg))] #![cfg_attr(feature = "nightly_portable_simd", feature(portable_simd))] -#![cfg_attr(feature = "nightly_stdsimd", feature(stdarch_x86_avx512))] +#![cfg_attr( + all( + feature = "nightly_stdsimd", + any(target_arch = "x86_64", target_arch = "x86") + ), + feature(stdarch_x86_avx512) +)] //! This crate gives small utilities for casting between plain data types. //!