simd_blur

Function simd_blur 

Source
pub fn simd_blur<T, Bsimd: StackBlurrable, Bsingle: StackBlurrable, const LANES: usize>(
    buffer: &mut ImgRefMut<'_, T>,
    radius: usize,
    to_blurrable_simd: impl FnMut([&T; LANES]) -> Bsimd,
    to_pixel_simd: impl FnMut(Bsimd) -> [T; LANES],
    to_blurrable_single: impl FnMut(&T) -> Bsingle,
    to_pixel_single: impl FnMut(Bsingle) -> T,
)
Expand description

Blurs a buffer with SIMD, assuming one element per pixel.

The provided closures are used to convert from the buffer’s native pixel format to StackBlurrable values that can be consumed by StackBlur.