mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 05:06:44 +01:00
Update to non-avx builds
This commit is contained in:
@@ -1,4 +1,19 @@
|
||||
#![cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
||||
// ─────────────────────────────────────────────────────────────
|
||||
// Build the backend **only when ALL conditions are satisfied**
|
||||
// ─────────────────────────────────────────────────────────────
|
||||
#![cfg(all(feature = "enable-avx", target_arch = "x86_64", target_feature = "avx2", target_feature = "fma"))]
|
||||
|
||||
// If the user enables this backend but targets a non-x86_64 CPU → abort
|
||||
#[cfg(all(feature = "enable-avx", not(target_arch = "x86_64")))]
|
||||
compile_error!("feature `enable-avx` requires target_arch = \"x86_64\".");
|
||||
|
||||
// If the user enables this backend but AVX2 isn't enabled in the target → abort
|
||||
#[cfg(all(feature = "enable-avx", target_arch = "x86_64", not(target_feature = "avx2")))]
|
||||
compile_error!("feature `enable-avx` requires AVX2. Build with RUSTFLAGS=\"-C target-feature=+avx2\".");
|
||||
|
||||
// If the user enables this backend but FMA isn't enabled in the target → abort
|
||||
#[cfg(all(feature = "enable-avx", target_arch = "x86_64", not(target_feature = "fma")))]
|
||||
compile_error!("feature `enable-avx` requires FMA. Build with RUSTFLAGS=\"-C target-feature=+fma\".");
|
||||
|
||||
mod module;
|
||||
mod reim;
|
||||
|
||||
Reference in New Issue
Block a user