#[cfg(all(target_arch = "x86_64", feature = "avx"))]
pub(crate) mod avx;
#[cfg(all(target_arch = "aarch64", feature = "neon"))]
pub(crate) mod neon;
#[cfg(target_arch = "aarch64")]
pub(crate) mod neon_add_scaled;
pub(crate) mod rgb8_blend;
pub(crate) mod scaled_add;
#[cfg(any(
all(target_arch = "x86_64", feature = "avx"),
all(any(target_arch = "x86", target_arch = "x86_64"), feature = "sse")
))]
pub(crate) mod sse;
#[cfg(all(target_arch = "wasm32", feature = "wasm", target_feature = "simd128"))]
pub(crate) mod wasm;
#[cfg(any(
all(target_arch = "x86_64", feature = "avx"),
all(any(target_arch = "x86", target_arch = "x86_64"), feature = "sse"),
all(target_arch = "wasm32", feature = "wasm", target_feature = "simd128")
))]
const RGB8_SHUFFLE: [[[u8; 16]; 3]; 3] = {
let mut masks = [[[0x80; 16]; 3]; 3];
let mut c = 0;
while c < 3 {
let mut i = 0;
while i < 16 {
let byte = 3 * i + c;
masks[c][byte / 16][i] = (byte % 16) as u8;
i += 1;
}
c += 1;
}
masks
};
#[cfg(test)]
mod tests;