#[cfg(target_arch = "aarch64")]
mod aarch64;
#[cfg(target_arch = "x86_64")]
mod x86;
#[inline]
pub fn has_avx2_support() -> bool {
#[cfg(all(target_arch = "x86_64", feature = "std", not(target_arch = "wasm32")))]
{
std::is_x86_feature_detected!("avx2")
}
#[cfg(not(all(target_arch = "x86_64", feature = "std", not(target_arch = "wasm32"))))]
{
false
}
}
#[inline]
pub fn has_neon_support() -> bool {
#[cfg(target_arch = "aarch64")]
{
true
}
#[cfg(not(target_arch = "aarch64"))]
{
false
}
}
#[cfg(target_arch = "x86_64")]
pub(crate) use x86::{
LANES, add, add_wide, dot, dot_wide, matrix_mul_square, mul, mul_wide, squared_diff_sum,
squared_diff_sum_wide, sum, sum_wide,
};
#[cfg(target_arch = "aarch64")]
pub(crate) use aarch64::{LANES, add, dot, matrix_mul_square, mul, squared_diff_sum, sum};