Skip to main content

X64V3Token

Struct X64V3Token 

Source
pub struct X64V3Token { /* private fields */ }
Expand description

Proof that AVX2 + FMA + BMI1/2 + F16C + LZCNT are available (x86-64-v3 level).

x86-64-v3 implies all of v2 plus: AVX, AVX2, FMA, BMI1, BMI2, F16C, LZCNT, MOVBE. This is the Haswell (2013) / Zen 1 (2017) baseline.

This is the most commonly targeted level for high-performance SIMD code.

Implementations§

Source§

impl X64V3Token

Source

pub fn v2(self) -> X64V2Token

Get a X64V2Token (x86-64-v3 implies x86-64-v2)

Source

pub fn v1(self) -> X64V1Token

Get a X64V1Token (x86-64-v3 implies x86-64-v1)

Source§

impl X64V3Token

Source

pub fn dangerously_disable_token_process_wide( disabled: bool, ) -> Result<(), CompileTimeGuaranteedError>

Disable this token process-wide for testing and benchmarking.

When disabled, summon() will return None even if the CPU supports the required features.

Returns Err when all required features are compile-time enabled (e.g., via -Ctarget-cpu=native), since the compiler has already elided the runtime checks.

Cascading: Also affects descendants:

  • X64V4Token
  • Avx512ModernToken
  • Avx512Fp16Token
Source

pub fn manually_disabled() -> Result<bool, CompileTimeGuaranteedError>

Check if this token has been manually disabled process-wide.

Returns Err when all required features are compile-time enabled.

Trait Implementations§

Source§

impl Clone for X64V3Token

Source§

fn clone(&self) -> X64V3Token

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for X64V3Token

Source§

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

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

impl IntoConcreteToken for X64V3Token

Source§

fn as_x64v3(self) -> Option<X64V3Token>

Try to cast to X64V3Token.
Source§

fn as_x64v1(self) -> Option<X64V1Token>

Try to cast to X64V1Token.
Source§

fn as_x64v2(self) -> Option<X64V2Token>

Try to cast to X64V2Token.
Source§

fn as_x64v4(self) -> Option<X64V4Token>

Try to cast to X64V4Token.
Source§

fn as_avx512_modern(self) -> Option<Avx512ModernToken>

Try to cast to Avx512ModernToken.
Source§

fn as_avx512_fp16(self) -> Option<Avx512Fp16Token>

Try to cast to Avx512Fp16Token.
Source§

fn as_neon(self) -> Option<NeonToken>

Try to cast to NeonToken.
Source§

fn as_neon_aes(self) -> Option<NeonAesToken>

Try to cast to NeonAesToken.
Source§

fn as_neon_sha3(self) -> Option<NeonSha3Token>

Try to cast to NeonSha3Token.
Source§

fn as_neon_crc(self) -> Option<NeonCrcToken>

Try to cast to NeonCrcToken.
Source§

fn as_wasm128(self) -> Option<Wasm128Token>

Try to cast to Wasm128Token.
Source§

fn as_scalar(self) -> Option<ScalarToken>

Try to cast to ScalarToken.
Source§

impl SimdToken for X64V3Token

Source§

const NAME: &'static str = "x86-64-v3"

Human-readable name for diagnostics and error messages.
Source§

const TARGET_FEATURES: &'static str = "sse,sse2,sse3,ssse3,sse4.1,sse4.2,popcnt,avx,avx2,fma,bmi1,bmi2,f16c,lzcnt"

Comma-delimited target features (e.g., "sse,sse2,avx2,fma,bmi1,bmi2,f16c,lzcnt"). Read more
Source§

const ENABLE_TARGET_FEATURES: &'static str = "-Ctarget-feature=+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+avx2,+fma,+bmi1,+bmi2,+f16c,+lzcnt"

RUSTFLAGS to enable these features at compile time. Read more
Source§

const DISABLE_TARGET_FEATURES: &'static str = "-Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-popcnt,-avx,-avx2,-fma,-bmi1,-bmi2,-f16c,-lzcnt"

RUSTFLAGS to disable these features at compile time. Read more
Source§

fn compiled_with() -> Option<bool>

Check if this binary was compiled with the required target features enabled. Read more
Source§

fn summon() -> Option<X64V3Token>

Attempt to create a token with runtime feature detection. Read more
Source§

unsafe fn forge_token_dangerously() -> X64V3Token

👎Deprecated since 0.5.0: Pass tokens through from summon() instead of forging
Create a token without any checks. Read more
Source§

fn guaranteed() -> Option<bool>

👎Deprecated since 0.6.0: Use compiled_with() instead
Deprecated alias for compiled_with().
Source§

fn attempt() -> Option<Self>

Attempt to create a token with runtime feature detection. Read more
Source§

impl SimdTypes for X64V3Token

Available on x86-64 only.
Source§

const F32_LANES: usize = 8

Number of f32 lanes in the F32 type
Source§

const F64_LANES: usize = 4

Number of f64 lanes in the F64 type
Source§

const I32_LANES: usize = 8

Number of i32 lanes in the I32 type
Source§

type F32 = f32x8

32-bit floating point vector (e.g., f32x8 for AVX2)
Source§

type F64 = f64x4

64-bit floating point vector (e.g., f64x4 for AVX2)
Source§

type I8 = i8x32

8-bit signed integer vector
Source§

type I16 = i16x16

16-bit signed integer vector
Source§

type I32 = i32x8

32-bit signed integer vector
Source§

type I64 = i64x4

64-bit signed integer vector
Source§

type U8 = u8x32

8-bit unsigned integer vector
Source§

type U16 = u16x16

16-bit unsigned integer vector
Source§

type U32 = u32x8

32-bit unsigned integer vector
Source§

type U64 = u64x4

64-bit unsigned integer vector
Source§

impl WidthDispatch for X64V3Token

Source§

type F32x4 = f32x4

Source§

type F64x2 = f64x2

Source§

type I8x16 = i8x16

Source§

type U8x16 = u8x16

Source§

type I16x8 = i16x8

Source§

type U16x8 = u16x8

Source§

type I32x4 = i32x4

Source§

type U32x4 = u32x4

Source§

type I64x2 = i64x2

Source§

type U64x2 = u64x2

Source§

type F32x8 = f32x8

Source§

type F64x4 = f64x4

Source§

type I8x32 = i8x32

Source§

type U8x32 = u8x32

Source§

type I16x16 = i16x16

Source§

type U16x16 = u16x16

Source§

type I32x8 = i32x8

Source§

type U32x8 = u32x8

Source§

type I64x4 = i64x4

Source§

type U64x4 = u64x4

Source§

type F32x16 = f32x16

Source§

type F64x8 = f64x8

Source§

type I8x64 = i8x64

Source§

type U8x64 = u8x64

Source§

type I16x32 = i16x32

Source§

type U16x32 = u16x32

Source§

type I32x16 = i32x16

Source§

type U32x16 = u32x16

Source§

type I64x8 = i64x8

Source§

type U64x8 = u64x8

Source§

fn f32x4_splat(self, v: f32) -> <X64V3Token as WidthDispatch>::F32x4

Source§

fn f32x4_zero(self) -> <X64V3Token as WidthDispatch>::F32x4

Source§

fn f32x4_load(self, data: &[f32; 4]) -> <X64V3Token as WidthDispatch>::F32x4

Source§

fn f64x2_splat(self, v: f64) -> <X64V3Token as WidthDispatch>::F64x2

Source§

fn f64x2_zero(self) -> <X64V3Token as WidthDispatch>::F64x2

Source§

fn f64x2_load(self, data: &[f64; 2]) -> <X64V3Token as WidthDispatch>::F64x2

Source§

fn i8x16_splat(self, v: i8) -> <X64V3Token as WidthDispatch>::I8x16

Source§

fn i8x16_zero(self) -> <X64V3Token as WidthDispatch>::I8x16

Source§

fn i8x16_load(self, data: &[i8; 16]) -> <X64V3Token as WidthDispatch>::I8x16

Source§

fn u8x16_splat(self, v: u8) -> <X64V3Token as WidthDispatch>::U8x16

Source§

fn u8x16_zero(self) -> <X64V3Token as WidthDispatch>::U8x16

Source§

fn u8x16_load(self, data: &[u8; 16]) -> <X64V3Token as WidthDispatch>::U8x16

Source§

fn i16x8_splat(self, v: i16) -> <X64V3Token as WidthDispatch>::I16x8

Source§

fn i16x8_zero(self) -> <X64V3Token as WidthDispatch>::I16x8

Source§

fn i16x8_load(self, data: &[i16; 8]) -> <X64V3Token as WidthDispatch>::I16x8

Source§

fn u16x8_splat(self, v: u16) -> <X64V3Token as WidthDispatch>::U16x8

Source§

fn u16x8_zero(self) -> <X64V3Token as WidthDispatch>::U16x8

Source§

fn u16x8_load(self, data: &[u16; 8]) -> <X64V3Token as WidthDispatch>::U16x8

Source§

fn i32x4_splat(self, v: i32) -> <X64V3Token as WidthDispatch>::I32x4

Source§

fn i32x4_zero(self) -> <X64V3Token as WidthDispatch>::I32x4

Source§

fn i32x4_load(self, data: &[i32; 4]) -> <X64V3Token as WidthDispatch>::I32x4

Source§

fn u32x4_splat(self, v: u32) -> <X64V3Token as WidthDispatch>::U32x4

Source§

fn u32x4_zero(self) -> <X64V3Token as WidthDispatch>::U32x4

Source§

fn u32x4_load(self, data: &[u32; 4]) -> <X64V3Token as WidthDispatch>::U32x4

Source§

fn i64x2_splat(self, v: i64) -> <X64V3Token as WidthDispatch>::I64x2

Source§

fn i64x2_zero(self) -> <X64V3Token as WidthDispatch>::I64x2

Source§

fn i64x2_load(self, data: &[i64; 2]) -> <X64V3Token as WidthDispatch>::I64x2

Source§

fn u64x2_splat(self, v: u64) -> <X64V3Token as WidthDispatch>::U64x2

Source§

fn u64x2_zero(self) -> <X64V3Token as WidthDispatch>::U64x2

Source§

fn u64x2_load(self, data: &[u64; 2]) -> <X64V3Token as WidthDispatch>::U64x2

Source§

fn f32x8_splat(self, v: f32) -> <X64V3Token as WidthDispatch>::F32x8

Source§

fn f32x8_zero(self) -> <X64V3Token as WidthDispatch>::F32x8

Source§

fn f32x8_load(self, data: &[f32; 8]) -> <X64V3Token as WidthDispatch>::F32x8

Source§

fn f64x4_splat(self, v: f64) -> <X64V3Token as WidthDispatch>::F64x4

Source§

fn f64x4_zero(self) -> <X64V3Token as WidthDispatch>::F64x4

Source§

fn f64x4_load(self, data: &[f64; 4]) -> <X64V3Token as WidthDispatch>::F64x4

Source§

fn i8x32_splat(self, v: i8) -> <X64V3Token as WidthDispatch>::I8x32

Source§

fn i8x32_zero(self) -> <X64V3Token as WidthDispatch>::I8x32

Source§

fn i8x32_load(self, data: &[i8; 32]) -> <X64V3Token as WidthDispatch>::I8x32

Source§

fn u8x32_splat(self, v: u8) -> <X64V3Token as WidthDispatch>::U8x32

Source§

fn u8x32_zero(self) -> <X64V3Token as WidthDispatch>::U8x32

Source§

fn u8x32_load(self, data: &[u8; 32]) -> <X64V3Token as WidthDispatch>::U8x32

Source§

fn i16x16_splat(self, v: i16) -> <X64V3Token as WidthDispatch>::I16x16

Source§

fn i16x16_zero(self) -> <X64V3Token as WidthDispatch>::I16x16

Source§

fn i16x16_load(self, data: &[i16; 16]) -> <X64V3Token as WidthDispatch>::I16x16

Source§

fn u16x16_splat(self, v: u16) -> <X64V3Token as WidthDispatch>::U16x16

Source§

fn u16x16_zero(self) -> <X64V3Token as WidthDispatch>::U16x16

Source§

fn u16x16_load(self, data: &[u16; 16]) -> <X64V3Token as WidthDispatch>::U16x16

Source§

fn i32x8_splat(self, v: i32) -> <X64V3Token as WidthDispatch>::I32x8

Source§

fn i32x8_zero(self) -> <X64V3Token as WidthDispatch>::I32x8

Source§

fn i32x8_load(self, data: &[i32; 8]) -> <X64V3Token as WidthDispatch>::I32x8

Source§

fn u32x8_splat(self, v: u32) -> <X64V3Token as WidthDispatch>::U32x8

Source§

fn u32x8_zero(self) -> <X64V3Token as WidthDispatch>::U32x8

Source§

fn u32x8_load(self, data: &[u32; 8]) -> <X64V3Token as WidthDispatch>::U32x8

Source§

fn i64x4_splat(self, v: i64) -> <X64V3Token as WidthDispatch>::I64x4

Source§

fn i64x4_zero(self) -> <X64V3Token as WidthDispatch>::I64x4

Source§

fn i64x4_load(self, data: &[i64; 4]) -> <X64V3Token as WidthDispatch>::I64x4

Source§

fn u64x4_splat(self, v: u64) -> <X64V3Token as WidthDispatch>::U64x4

Source§

fn u64x4_zero(self) -> <X64V3Token as WidthDispatch>::U64x4

Source§

fn u64x4_load(self, data: &[u64; 4]) -> <X64V3Token as WidthDispatch>::U64x4

Source§

fn f32x16_splat(self, v: f32) -> <X64V3Token as WidthDispatch>::F32x16

Source§

fn f32x16_zero(self) -> <X64V3Token as WidthDispatch>::F32x16

Source§

fn f32x16_load(self, data: &[f32; 16]) -> <X64V3Token as WidthDispatch>::F32x16

Source§

fn f64x8_splat(self, v: f64) -> <X64V3Token as WidthDispatch>::F64x8

Source§

fn f64x8_zero(self) -> <X64V3Token as WidthDispatch>::F64x8

Source§

fn f64x8_load(self, data: &[f64; 8]) -> <X64V3Token as WidthDispatch>::F64x8

Source§

fn i8x64_splat(self, v: i8) -> <X64V3Token as WidthDispatch>::I8x64

Source§

fn i8x64_zero(self) -> <X64V3Token as WidthDispatch>::I8x64

Source§

fn i8x64_load(self, data: &[i8; 64]) -> <X64V3Token as WidthDispatch>::I8x64

Source§

fn u8x64_splat(self, v: u8) -> <X64V3Token as WidthDispatch>::U8x64

Source§

fn u8x64_zero(self) -> <X64V3Token as WidthDispatch>::U8x64

Source§

fn u8x64_load(self, data: &[u8; 64]) -> <X64V3Token as WidthDispatch>::U8x64

Source§

fn i16x32_splat(self, v: i16) -> <X64V3Token as WidthDispatch>::I16x32

Source§

fn i16x32_zero(self) -> <X64V3Token as WidthDispatch>::I16x32

Source§

fn i16x32_load(self, data: &[i16; 32]) -> <X64V3Token as WidthDispatch>::I16x32

Source§

fn u16x32_splat(self, v: u16) -> <X64V3Token as WidthDispatch>::U16x32

Source§

fn u16x32_zero(self) -> <X64V3Token as WidthDispatch>::U16x32

Source§

fn u16x32_load(self, data: &[u16; 32]) -> <X64V3Token as WidthDispatch>::U16x32

Source§

fn i32x16_splat(self, v: i32) -> <X64V3Token as WidthDispatch>::I32x16

Source§

fn i32x16_zero(self) -> <X64V3Token as WidthDispatch>::I32x16

Source§

fn i32x16_load(self, data: &[i32; 16]) -> <X64V3Token as WidthDispatch>::I32x16

Source§

fn u32x16_splat(self, v: u32) -> <X64V3Token as WidthDispatch>::U32x16

Source§

fn u32x16_zero(self) -> <X64V3Token as WidthDispatch>::U32x16

Source§

fn u32x16_load(self, data: &[u32; 16]) -> <X64V3Token as WidthDispatch>::U32x16

Source§

fn i64x8_splat(self, v: i64) -> <X64V3Token as WidthDispatch>::I64x8

Source§

fn i64x8_zero(self) -> <X64V3Token as WidthDispatch>::I64x8

Source§

fn i64x8_load(self, data: &[i64; 8]) -> <X64V3Token as WidthDispatch>::I64x8

Source§

fn u64x8_splat(self, v: u64) -> <X64V3Token as WidthDispatch>::U64x8

Source§

fn u64x8_zero(self) -> <X64V3Token as WidthDispatch>::U64x8

Source§

fn u64x8_load(self, data: &[u64; 8]) -> <X64V3Token as WidthDispatch>::U64x8

Source§

impl Copy for X64V3Token

Source§

impl Has128BitSimd for X64V3Token

Source§

impl Has256BitSimd for X64V3Token

Source§

impl HasX64V2 for X64V3Token

Source§

impl Sealed for X64V3Token

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.