Skip to main content

Feature

Enum Feature 

Source
#[non_exhaustive]
pub enum Feature {
Show 45 variants Sse2, Sse3, Ssse3, Sse41, Sse42, Popcnt, Avx, Avx2, Fma, F16c, Bmi1, Bmi2, Lzcnt, Movbe, Avx512f, Avx512bw, Avx512cd, Avx512dq, Avx512vl, Avx512vnni, Avx512vbmi, AvxVnni, Aes, Pclmulqdq, Vaes, Vpclmulqdq, Sha, Rdrand, Rdseed, Adx, Gfni, Neon, Crc32, AesArm, Pmull, Sha2, Sha3, Dotprod, Fp16, Lse, Sve, Sve2, Rcpc, Bf16, I8mm,
}
Expand description

An instruction-set feature. name is rustc’s target-feature name.

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

Sse2

x86 SSE2.

§

Sse3

x86 SSE3.

§

Ssse3

x86 SSSE3.

§

Sse41

x86 SSE4.1.

§

Sse42

x86 SSE4.2.

§

Popcnt

x86 POPCNT.

§

Avx

x86 AVX.

§

Avx2

x86 AVX2.

§

Fma

x86 FMA3.

§

F16c

x86 F16C.

§

Bmi1

x86 BMI1.

§

Bmi2

x86 BMI2.

§

Lzcnt

x86 LZCNT.

§

Movbe

x86 MOVBE.

§

Avx512f

x86 AVX-512 Foundation.

§

Avx512bw

x86 AVX-512 byte and word.

§

Avx512cd

x86 AVX-512 conflict detection.

§

Avx512dq

x86 AVX-512 doubleword and quadword.

§

Avx512vl

x86 AVX-512 vector length.

§

Avx512vnni

x86 AVX-512 VNNI.

§

Avx512vbmi

x86 AVX-512 VBMI.

§

AvxVnni

x86 AVX-VNNI.

§

Aes

x86 AES-NI.

§

Pclmulqdq

x86 carry-less multiplication.

§

Vaes

x86 vector AES.

§

Vpclmulqdq

x86 vector carry-less multiplication.

§

Sha

x86 SHA extensions.

§

Rdrand

x86 RDRAND.

§

Rdseed

x86 RDSEED.

§

Adx

x86 ADX.

§

Gfni

x86 GFNI.

§

Neon

AArch64 Advanced SIMD.

§

Crc32

AArch64 CRC32.

§

AesArm

AArch64 AES.

§

Pmull

AArch64 polynomial multiply.

§

Sha2

AArch64 SHA-1 and SHA-256.

§

Sha3

AArch64 SHA-3 and SHA-512 (std’s sha3).

§

Dotprod

AArch64 dot product.

§

Fp16

AArch64 half-precision arithmetic.

§

Lse

AArch64 large system extensions (atomics).

§

Sve

AArch64 SVE.

§

Sve2

AArch64 SVE2.

§

Rcpc

AArch64 release-consistent loads.

§

Bf16

AArch64 BFloat16.

§

I8mm

AArch64 int8 matrix multiply.

Implementations§

Source§

impl Feature

Source

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

rustc’s target-feature name: "avx2", "sse4.1", "neon".

assert_eq!(sys_lib::cpu::Feature::Sse41.name(), "sse4.1");

Trait Implementations§

Source§

impl Clone for Feature

Source§

fn clone(&self) -> Self

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 Feature

Source§

impl Debug for Feature

Source§

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

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

impl Eq for Feature

Source§

impl Hash for Feature

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 Feature

Source§

fn eq(&self, other: &Self) -> 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 Feature

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.