Skip to main content

NeonToken

Struct NeonToken 

Source
pub struct NeonToken { /* private fields */ }
Available on non-AArch64 only.
Expand description

Stub for NEON token (not available on this architecture).

Implementations§

Source§

impl NeonToken

Source

pub unsafe fn forge_token_dangerously() -> Self

👎Deprecated since 0.9.29:

Renamed to from_context() on native architectures; on a foreign architecture the features cannot exist at all

Construct a proof for a foreign architecture. Always unsafe.

On this token’s native architecture the constructor is from_context(), a safe #[target_feature] function that rustc checks against the caller’s feature context. The current compilation target is a different architecture, so no such context can exist, there is nothing for rustc to check, and no from_context() is generated — only this unsafe fn.

§Safety

Unsatisfiable: this token asserts CPU features that the target architecture does not have. Any token produced here is a lie, and using it to enter a SIMD region is undefined behavior. It exists so cross-architecture code compiles, not to be called.

Source§

impl NeonToken

Source

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

This token is not available on this architecture.

Source

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

This token is not available on this architecture.

Trait Implementations§

Source§

impl Clone for NeonToken

Source§

fn clone(&self) -> NeonToken

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 NeonToken

Source§

impl Debug for NeonToken

Source§

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

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

impl Has128BitSimd for NeonToken

Source§

impl HasNeon for NeonToken

Source§

impl IntoConcreteToken for NeonToken

Source§

fn as_neon(self) -> Option<NeonToken>

Try to cast to NeonToken.
Source§

fn as_x64v1(self) -> Option<X64V1Token>

Returns Some(self) if this is exactly X64V1Token, None otherwise. Read more
Source§

fn as_x64v2(self) -> Option<X64V2Token>

Try to cast to X64V2Token.
Source§

fn as_x64_crypto(self) -> Option<X64CryptoToken>

Try to cast to X64CryptoToken.
Source§

fn as_x64v3(self) -> Option<X64V3Token>

Try to cast to X64V3Token.
Source§

fn as_x64v3_crypto(self) -> Option<X64V3CryptoToken>

Try to cast to X64V3CryptoToken.
Source§

fn as_x64v3_gfni_crypto(self) -> Option<X64V3GfniCryptoToken>

Try to cast to X64V3GfniCryptoToken.
Source§

fn as_x64v4(self) -> Option<X64V4Token>

Try to cast to X64V4Token.
Source§

fn as_x64v4x(self) -> Option<X64V4xToken>

Try to cast to X64V4xToken.
Source§

fn as_avx512_fp16(self) -> Option<Avx512Fp16Token>

Try to cast to Avx512Fp16Token.
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_arm_v2(self) -> Option<Arm64V2Token>

Try to cast to Arm64V2Token.
Source§

fn as_arm_v3(self) -> Option<Arm64V3Token>

Try to cast to Arm64V3Token.
Source§

fn as_wasm128(self) -> Option<Wasm128Token>

Try to cast to Wasm128Token.
Source§

fn as_wasm128_relaxed(self) -> Option<Wasm128RelaxedToken>

Try to cast to Wasm128RelaxedToken.
Source§

fn as_scalar(self) -> Option<ScalarToken>

Try to cast to ScalarToken.
Source§

impl SimdToken for NeonToken

Source§

const NAME: &'static str = "NEON"

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

const TARGET_FEATURES: &'static str = "neon"

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=+neon"

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

const DISABLE_TARGET_FEATURES: &'static str = "-Ctarget-feature=-neon"

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<Self>

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

fn name(&self) -> &'static str

Returns the human-readable name for this token. 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

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.