Skip to main content

Module simd

Module simd 

Source
Expand description

The process-wide SIMD instruction-set override shared by every codec kernel.

zvidlib’s codecs dispatch their hot loops to runtime-detected vector kernels in many independent places, each caching its own CPU feature probe. This module is the single switch every one of them consults first; see zvidlib::simd for the user-facing description and the per-site report.

Enums§

SimdIsa
An instruction set the SIMD kernels can run on.

Functions§

active
The instruction set currently in force: the set_override value when one is set, otherwise detected.
available
Every instruction set this host can execute, always including SimdIsa::Scalar.
available_isas
Every instruction set that can be exercised on this host, always including SimdIsa::Scalar. Used by the bit-exactness tests and the benchmark.
detected
The widest instruction set this host supports, ignoring any set_override.
detected_isa
The best instruction set this CPU supports, ignoring any set_override.
lanes
Number of samples a single vector operation covers on isa, or 0 when isa has no vector path and callers should stay scalar.
set_override
Forces every SIMD-dispatched kernel in the crate onto isa, or restores per-site automatic detection with None.