#[non_exhaustive]pub enum SimdTier {
Unknown,
CurrentHost,
Wasm,
Wasm128,
Neon,
X86V1,
X86V2,
X86V3,
X86V4,
}Expand description
SIMD instruction tier the codec will dispatch to. Optional hint on
ComputeEnvironment — a wider/newer tier generally means faster
encode/decode, so estimates can apply a per-tier time factor. Variants
mirror the x86-64-vN microarchitecture levels and the archmage /
magetypes token vocabulary, so an archmage-detected tier maps trivially.
use zenpixels_convert::{ComputeEnvironment, SimdTier};
let tier = if archmage::X64V4Token::summon().is_some() { SimdTier::X86V4 }
else if archmage::X64V3Token::summon().is_some() { SimdTier::X86V3 }
else if archmage::X64V2Token::summon().is_some() { SimdTier::X86V2 }
else { SimdTier::X86V1 };
let env = ComputeEnvironment::new().with_cores(8).with_simd_tier(tier);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown
SIMD tier unknown. Currently treated as the AVX2 calibration
baseline (multiplier 1.0) — there is no separate conservative
cross-tier model yet; one lands with the per-tier calibration
sweep (see the TODO on estimate_plan). Use
CurrentHost for the local machine.
CurrentHost
Host running the estimate (≈ calibration host’s native tier). Distinct
from Unknown which is a cross-tier average.
Wasm
WebAssembly, no SIMD128 (scalar wasm).
Wasm128
WebAssembly SIMD128.
Neon
AArch64 / ARM NEON (archmage NeonToken).
X86V1
x86-64-v1 — SSE2 baseline.
X86V2
x86-64-v2 — SSE4.2 (archmage X64V2Token).
X86V3
x86-64-v3 — AVX2 + FMA (archmage X64V3Token).
X86V4
x86-64-v4 — AVX-512 (archmage X64V4Token).