//! AVX2 optimized Shannon entropy for x86_64.
use crate;
/// AVX2 path: the 8-way ILP histogram (the memory-bound part) shared via
/// [`histogram_8way`], then the shared exact [`entropy_from_histogram`] reduction.
///
/// The `#[target_feature(enable = "avx2,fma")]` attribute is retained so this
/// stays a distinct dispatch slot, but the reduction is no longer a vectorized
/// polynomial-log2 (which diverged from the scalar reference by ~5e-3 bits/byte
/// see [`entropy_from_histogram`]); the 256-bin reduction is negligible and now
/// bit-identical to every other path.
///
/// # Safety
/// The CPU executing this call must support both `avx2` and `fma` (the
/// `#[target_feature]` set). The caller is responsible for gating dispatch on a
/// runtime feature probe (see `shannon_entropy_simd`, which checks
/// `is_x86_feature_detected!("avx2")` + `..("fma")`); invoking on a CPU lacking
/// either is undefined behaviour / SIGILL.
pub unsafe