Skip to main content

SimdTier

Enum SimdTier 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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).

Trait Implementations§

Source§

impl Clone for SimdTier

Source§

fn clone(&self) -> SimdTier

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SimdTier

Source§

impl Debug for SimdTier

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SimdTier

Source§

impl Hash for SimdTier

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for SimdTier

Source§

fn eq(&self, other: &SimdTier) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SimdTier

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.