pub unsafe fn batchnorm_avx2(
input: &[f32],
n: usize,
c: usize,
gamma: &[f32],
beta: &[f32],
eps: f32,
running_mean: &mut [f32],
running_var: &mut [f32],
output: &mut [f32],
momentum: f32,
training: bool,
)Expand description
AVX2 BatchNorm – delegates to scalar.
Batch dimension reduction is irregular for SIMD (strided access across samples for each channel), so this delegates to the scalar implementation.
§Safety
Requires AVX2 support. Caller must verify with is_x86_feature_detected!("avx2").
§Panics
Panics if buffer sizes are inconsistent with n * c.