pub struct SimdCapabilities {
pub avx2: bool,
pub avx512: bool,
pub neon: bool,
}Expand description
CPU SIMD capabilities.
This structure represents the SIMD instruction sets available on the current CPU, detected at runtime.
Fields§
§avx2: boolx86 AVX2 support (Intel Haswell 2013+, AMD Excavator 2015+).
avx512: boolx86 AVX-512 support (Intel Skylake-X 2017+, Ice Lake 2019+).
neon: boolARM NEON support (all ARMv8/AArch64, ARMv7-A with NEON).
Implementations§
Source§impl SimdCapabilities
impl SimdCapabilities
Sourcepub const fn has_avx512(&self) -> bool
pub const fn has_avx512(&self) -> bool
Check if AVX-512 is available.
Sourcepub const fn best_level(&self) -> &'static str
pub const fn best_level(&self) -> &'static str
Get the best available SIMD level name.
Trait Implementations§
Source§impl Clone for SimdCapabilities
impl Clone for SimdCapabilities
Source§fn clone(&self) -> SimdCapabilities
fn clone(&self) -> SimdCapabilities
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 moreSource§impl Debug for SimdCapabilities
impl Debug for SimdCapabilities
Source§impl Default for SimdCapabilities
impl Default for SimdCapabilities
Source§fn default() -> SimdCapabilities
fn default() -> SimdCapabilities
Returns the “default value” for a type. Read more
impl Copy for SimdCapabilities
Auto Trait Implementations§
impl Freeze for SimdCapabilities
impl RefUnwindSafe for SimdCapabilities
impl Send for SimdCapabilities
impl Sync for SimdCapabilities
impl Unpin for SimdCapabilities
impl UnsafeUnpin for SimdCapabilities
impl UnwindSafe for SimdCapabilities
Blanket Implementations§
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,
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