#![allow(
// SAFETY: All unsafe blocks in this module are guarded by CPU feature detection
// (AVX-512F or AVX-512 VNNI+BF16) at dispatch time via SimdMathConfig::current().
// Each function's doc comment documents specific slice/pointer invariants.
unsafe_op_in_unsafe_fn,
clippy::missing_safety_doc,
clippy::too_many_arguments
)]
mod activations;
mod bf16;
mod dsp;
mod gemv;
mod reduce;
use crate::math::common::InstructionSet;
use crate::math::common::scalar_ref::*;
use crate::math::common::traits::SimdMath;
use core::arch::x86_64::*;
pub struct Avx512Math;
pub struct Avx512VnniBf16Math;
impl SimdMath for Avx512Math {
type V = __m512;
const ISA: InstructionSet = InstructionSet::Avx512;
gemv::impl_avx512_gemv!();
activations::impl_avx512_activations!();
bf16::impl_avx512_bf16!();
reduce::impl_avx512_reduce!();
dsp::impl_avx512_dsp!();
}
impl SimdMath for Avx512VnniBf16Math {
type V = __m512;
const ISA: InstructionSet = InstructionSet::Avx512VnniBf16;
gemv::impl_avx512vnni_bf16_gemv!();
activations::impl_avx512vnni_bf16_activations!();
bf16::impl_avx512vnni_bf16_bf16!();
reduce::impl_avx512vnni_bf16_reduce!();
dsp::impl_avx512vnni_bf16_dsp!();
}