1pub mod avx2;
2pub mod avx512;
3pub mod scalar;
4pub mod sse2;
5pub mod ssse3;
6pub mod wasm;
7
8pub type Adler32Imp = fn(u16, u16, &[u8]) -> (u16, u16);
9
10#[inline]
11#[allow(non_snake_case)]
12pub const fn _MM_SHUFFLE(z: u32, y: u32, x: u32, w: u32) -> i32 {
13 ((z << 6) | (y << 4) | (x << 2) | w) as i32
14}
15
16pub fn get_imp() -> Adler32Imp {
17 avx512::get_imp()
18 .or_else(avx2::get_imp)
19 .or_else(ssse3::get_imp)
20 .or_else(sse2::get_imp)
21 .or_else(wasm::get_imp)
22 .unwrap_or(default:scalar::update)
23}
24