Skip to main content

Module cpu

Module cpu 

Source
Expand description

CPU feature detection and runtime kernel selection.

CpuFeatures is the set of features the host supports, detected once. Kernels declare the features they need with target_kernel!, and a Dispatch picks the first candidate the host supports.

Structs§

Candidate
A kernel together with the CPU features it needs.
CpuFeatures
A set of CPU features, named after rustc target_features.
Dispatch
One operation’s kernels, best first, with the host’s choice made once.
Kernel
A kernel the host is known to support, so calling it is safe.
Selection
Where a Dispatch caches its host-selected kernel.
SimdInfo
Snapshot of the SIMD tier lance dispatches to on the current host, plus the raw CPU features detected for diagnostic purposes.

Enums§

SimdSupport
A level of SIMD support for some feature.

Statics§

SIMD_SUPPORT
Support for SIMD operations, derived from CpuFeatures::host.

Functions§

simd_info
Returns a snapshot of the SIMD tier lance is using on this host along with the raw CPU feature flags that drove the decision.