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
impl X64V3Token
Sourcepub fn v2(self) -> X64V2Token
pub fn v2(self) -> X64V2Token
Get a X64V2Token (x86-64-v3 implies x86-64-v2)
Sourcepub fn v1(self) -> X64V1Token
pub fn v1(self) -> X64V1Token
Get a X64V1Token (x86-64-v3 implies x86-64-v1)
Source§impl X64V3Token
impl X64V3Token
Sourcepub fn dangerously_disable_token_process_wide(
disabled: bool,
) -> Result<(), CompileTimeGuaranteedError>
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:
X64V4TokenAvx512ModernTokenAvx512Fp16Token
Sourcepub fn manually_disabled() -> Result<bool, CompileTimeGuaranteedError>
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
impl Clone for X64V3Token
Source§fn clone(&self) -> X64V3Token
fn clone(&self) -> X64V3Token
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for X64V3Token
impl Debug for X64V3Token
Source§impl IntoConcreteToken for X64V3Token
impl IntoConcreteToken for X64V3Token
Source§fn as_x64v3(self) -> Option<X64V3Token>
fn as_x64v3(self) -> Option<X64V3Token>
Source§fn as_x64v1(self) -> Option<X64V1Token>
fn as_x64v1(self) -> Option<X64V1Token>
Source§fn as_x64v2(self) -> Option<X64V2Token>
fn as_x64v2(self) -> Option<X64V2Token>
Source§fn as_x64v4(self) -> Option<X64V4Token>
fn as_x64v4(self) -> Option<X64V4Token>
Source§fn as_avx512_modern(self) -> Option<Avx512ModernToken>
fn as_avx512_modern(self) -> Option<Avx512ModernToken>
Source§fn as_avx512_fp16(self) -> Option<Avx512Fp16Token>
fn as_avx512_fp16(self) -> Option<Avx512Fp16Token>
Source§fn as_neon_aes(self) -> Option<NeonAesToken>
fn as_neon_aes(self) -> Option<NeonAesToken>
Source§fn as_neon_sha3(self) -> Option<NeonSha3Token>
fn as_neon_sha3(self) -> Option<NeonSha3Token>
Source§fn as_neon_crc(self) -> Option<NeonCrcToken>
fn as_neon_crc(self) -> Option<NeonCrcToken>
Source§fn as_wasm128(self) -> Option<Wasm128Token>
fn as_wasm128(self) -> Option<Wasm128Token>
Source§fn as_scalar(self) -> Option<ScalarToken>
fn as_scalar(self) -> Option<ScalarToken>
Source§impl SimdToken for X64V3Token
impl SimdToken for X64V3Token
Source§const NAME: &'static str = "x86-64-v3"
const NAME: &'static str = "x86-64-v3"
Source§const TARGET_FEATURES: &'static str = "sse,sse2,sse3,ssse3,sse4.1,sse4.2,popcnt,avx,avx2,fma,bmi1,bmi2,f16c,lzcnt"
const TARGET_FEATURES: &'static str = "sse,sse2,sse3,ssse3,sse4.1,sse4.2,popcnt,avx,avx2,fma,bmi1,bmi2,f16c,lzcnt"
"sse,sse2,avx2,fma,bmi1,bmi2,f16c,lzcnt"). Read moreSource§const ENABLE_TARGET_FEATURES: &'static str = "-Ctarget-feature=+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+avx2,+fma,+bmi1,+bmi2,+f16c,+lzcnt"
const ENABLE_TARGET_FEATURES: &'static str = "-Ctarget-feature=+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+avx2,+fma,+bmi1,+bmi2,+f16c,+lzcnt"
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"
const DISABLE_TARGET_FEATURES: &'static str = "-Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-popcnt,-avx,-avx2,-fma,-bmi1,-bmi2,-f16c,-lzcnt"
Source§fn compiled_with() -> Option<bool>
fn compiled_with() -> Option<bool>
Source§fn summon() -> Option<X64V3Token>
fn summon() -> Option<X64V3Token>
Source§unsafe fn forge_token_dangerously() -> X64V3Token
unsafe fn forge_token_dangerously() -> X64V3Token
Source§fn guaranteed() -> Option<bool>
fn guaranteed() -> Option<bool>
compiled_with().