Skip to main content

Crate scanline_simd

Crate scanline_simd 

Source
Expand description

Vectorised scan predicates.

Every public entry point here is safe and dispatches at runtime to the widest instruction set the host actually supports, falling back to a portable implementation. The unsafe surface is confined to the per-backend modules.

§Correctness invariant

Each backend must return exactly what the scalar oracle returns, for every input length — including lengths that are not a multiple of the vector width. Handling that tail is the single easiest thing to get wrong here: an implementation built only from chunks_exact(N) silently undercounts, since chunks_exact discards the remainder. Every backend below therefore pairs its vector loop with an explicit scalar pass over chunks_exact(..).remainder().

Modules§

portable
Portable fallback predicates.
x86
x86-64 intrinsic backends.

Enums§

Backend
Which backend a scan actually executed on.

Functions§

detect_backend
The widest backend supported by the host CPU.
scan_greater_than_i64
Counts elements of data strictly greater than target.
scan_greater_than_i64_with
Counts elements of data strictly greater than target using a specific backend.