#![expect(
missing_docs,
clippy::cast_possible_truncation,
clippy::unseparated_literal_suffix,
clippy::use_self,
clippy::wrong_self_convention,
reason = "Simplifies the generator and has no effect on the machine code"
)]
#![allow(
trivial_numeric_casts,
clippy::unnecessary_cast,
clippy::new_without_default,
reason = "Simplifies the generator and has no effect on the machine code, only tripped by some backends"
)]
macro_rules! with_fallback {
($($item:item)*) => {$(
#[cfg(any(
feature = "force_support_fallback",
not(any(
all(target_arch = "aarch64", target_feature = "neon"),
all(
any(target_arch = "x86", target_arch = "x86_64"),
target_feature = "sse2",
target_feature = "fxsr"
),
all(target_arch = "wasm32", target_feature = "simd128")
))
))]
$item
)*};
}
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
mod avx2;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
mod avx512;
with_fallback! {
mod fallback;
}
#[cfg(target_arch = "aarch64")]
mod neon;
mod ops;
pub(crate) mod simd_trait;
mod simd_types;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
mod sse2;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
mod sse4_2;
#[cfg(all(target_arch = "wasm32", target_feature = "simd128"))]
mod wasm;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub use avx2::*;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub use avx512::*;
with_fallback! {
pub use fallback::*;
}
#[cfg(target_arch = "aarch64")]
pub use neon::*;
pub use simd_trait::*;
pub use simd_types::*;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub use sse2::*;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub use sse4_2::*;
#[cfg(all(target_arch = "wasm32", target_feature = "simd128"))]
pub use wasm::*;