#[allow(dead_code)]
mod scalar;
#[cfg(all(
target_arch = "x86_64",
target_feature = "avx2",
target_feature = "fma"
))]
mod avx2;
#[inline]
pub fn ln_inplace(buf: &mut [f64]) {
#[cfg(all(
target_arch = "x86_64",
target_feature = "avx2",
target_feature = "fma"
))]
{
avx2::ln_inplace(buf);
}
#[cfg(not(all(
target_arch = "x86_64",
target_feature = "avx2",
target_feature = "fma"
)))]
{
scalar::ln_inplace(buf);
}
}
#[inline]
pub fn exp_sum(buf: &[f64], offset: f64) -> f64 {
#[cfg(all(
target_arch = "x86_64",
target_feature = "avx2",
target_feature = "fma"
))]
{
avx2::exp_sum(buf, offset)
}
#[cfg(not(all(
target_arch = "x86_64",
target_feature = "avx2",
target_feature = "fma"
)))]
{
scalar::exp_sum(buf, offset)
}
}