Enum CpuFeature
pub enum CpuFeature {
Show 15 variants
SSE2,
SSE3,
SSSE3,
SSE41,
SSE42,
POPCNT,
AVX,
BMI1,
BMI2,
AVX2,
AVX512DQ,
AVX512VL,
AVX512F,
LZCNT,
NEON,
}Expand description
The nomenclature is inspired by the cpuid crate.
The list of supported features was initially retrieved from
cranelift-native.
The CpuFeature enum values are likely to grow closer to the
original cpuid. However, we prefer to start small and grow from there.
If you would like to use a flag that doesn’t exist yet here, please open a PR.
Variants§
Implementations§
§impl CpuFeature
impl CpuFeature
pub fn for_host() -> EnumSet<CpuFeature>
pub fn for_host() -> EnumSet<CpuFeature>
Retrieves the features for the current Host
pub fn set() -> EnumSet<CpuFeature>
pub fn set() -> EnumSet<CpuFeature>
Retrieves an empty set of CpuFeatures.
pub fn all() -> EnumSet<CpuFeature>
pub fn all() -> EnumSet<CpuFeature>
Build a set of all available CpuFeatures.
Trait Implementations§
§impl<O> BitAnd<O> for CpuFeaturewhere
O: Into<EnumSet<CpuFeature>>,
impl<O> BitAnd<O> for CpuFeaturewhere
O: Into<EnumSet<CpuFeature>>,
§type Output = EnumSet<CpuFeature>
type Output = EnumSet<CpuFeature>
The resulting type after applying the
& operator.§impl<O> BitOr<O> for CpuFeaturewhere
O: Into<EnumSet<CpuFeature>>,
impl<O> BitOr<O> for CpuFeaturewhere
O: Into<EnumSet<CpuFeature>>,
§type Output = EnumSet<CpuFeature>
type Output = EnumSet<CpuFeature>
The resulting type after applying the
| operator.§impl<O> BitXor<O> for CpuFeaturewhere
O: Into<EnumSet<CpuFeature>>,
impl<O> BitXor<O> for CpuFeaturewhere
O: Into<EnumSet<CpuFeature>>,
§type Output = EnumSet<CpuFeature>
type Output = EnumSet<CpuFeature>
The resulting type after applying the
^ operator.§impl Clone for CpuFeature
impl Clone for CpuFeature
§fn clone(&self) -> CpuFeature
fn clone(&self) -> CpuFeature
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for CpuFeature
impl Debug for CpuFeature
§impl Display for CpuFeature
impl Display for CpuFeature
§impl FromStr for CpuFeature
impl FromStr for CpuFeature
§type Err = ParseCpuFeatureError
type Err = ParseCpuFeatureError
The associated error which can be returned from parsing.
§fn from_str(s: &str) -> Result<CpuFeature, <CpuFeature as FromStr>::Err>
fn from_str(s: &str) -> Result<CpuFeature, <CpuFeature as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for CpuFeature
impl Hash for CpuFeature
§impl Not for CpuFeature
impl Not for CpuFeature
§type Output = EnumSet<CpuFeature>
type Output = EnumSet<CpuFeature>
The resulting type after applying the
! operator.§impl PartialEq<EnumSet<CpuFeature>> for CpuFeature
impl PartialEq<EnumSet<CpuFeature>> for CpuFeature
§impl PartialEq for CpuFeature
impl PartialEq for CpuFeature
§impl<O> Sub<O> for CpuFeaturewhere
O: Into<EnumSet<CpuFeature>>,
impl<O> Sub<O> for CpuFeaturewhere
O: Into<EnumSet<CpuFeature>>,
§type Output = EnumSet<CpuFeature>
type Output = EnumSet<CpuFeature>
The resulting type after applying the
- operator.impl Copy for CpuFeature
impl EnumSetType for CpuFeature
impl Eq for CpuFeature
Auto Trait Implementations§
impl Freeze for CpuFeature
impl RefUnwindSafe for CpuFeature
impl Send for CpuFeature
impl Sync for CpuFeature
impl Unpin for CpuFeature
impl UnwindSafe for CpuFeature
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
§impl<T> Upcastable for T
impl<T> Upcastable for T
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn