#[must_use]
#[allow(clippy::missing_const_for_fn)]
pub fn has_avx2() -> bool {
#[cfg(target_arch = "x86_64")]
{
std::is_x86_feature_detected!("avx2")
}
#[cfg(not(target_arch = "x86_64"))]
{
false
}
}
#[must_use]
#[allow(clippy::missing_const_for_fn)]
pub fn has_sse42() -> bool {
#[cfg(target_arch = "x86_64")]
{
std::is_x86_feature_detected!("sse4.2")
}
#[cfg(not(target_arch = "x86_64"))]
{
false
}
}
#[must_use]
#[allow(clippy::missing_const_for_fn)]
pub fn has_neon() -> bool {
#[cfg(target_arch = "aarch64")]
{
std::arch::is_aarch64_feature_detected!("neon")
}
#[cfg(not(target_arch = "aarch64"))]
{
false
}
}