#[cfg(all(feature = "simd-avx2", target_arch = "x86_64", feature = "std"))]
pub fn has_avx2() -> bool {
std::arch::is_x86_feature_detected!("avx2")
}
#[cfg(all(feature = "simd-avx2", target_arch = "x86_64", not(feature = "std")))]
pub fn has_avx2() -> bool {
cfg!(target_feature = "avx2")
}
#[cfg(not(all(feature = "simd-avx2", target_arch = "x86_64")))]
pub fn has_avx2() -> bool {
false
}
#[cfg(all(feature = "simd-neon", target_arch = "aarch64", feature = "std"))]
pub fn has_neon() -> bool {
std::arch::is_aarch64_feature_detected!("neon")
}
#[cfg(all(feature = "simd-neon", target_arch = "aarch64", not(feature = "std")))]
pub fn has_neon() -> bool {
cfg!(target_feature = "neon")
}
#[cfg(not(all(feature = "simd-neon", target_arch = "aarch64")))]
pub fn has_neon() -> bool {
false
}