Skip to main content

Module util

Module util 

Source
Expand description

Utilities for working with SIMD operations

Functionsยง

align_down
Round down to the nearest multiple of alignment
align_up
Round up to the nearest multiple of alignment
aligned_vec_f32
Allocate a SIMD-aligned Vec<f32>
aligned_vec_f64
Allocate a SIMD-aligned Vec<f64>
chunks
Calculate the number of SIMD chunks for a given length and lane width
is_aligned
Check if a pointer is aligned to the given boundary
process_chunks
Process a slice in SIMD-width chunks, calling a function on each chunk and handling the scalar remainder.
remainder
Calculate the remainder after SIMD chunks