pub struct HardwareCapabilities {Show 16 fields
pub has_sse: bool,
pub has_sse2: bool,
pub has_sse3: bool,
pub has_ssse3: bool,
pub has_sse41: bool,
pub has_sse42: bool,
pub has_avx: bool,
pub has_avx2: bool,
pub has_avx512f: bool,
pub has_fma: bool,
pub has_gpu: bool,
pub gpu_memory: Option<usize>,
pub simd_available: bool,
pub avx2_available: bool,
pub avx512_available: bool,
pub gpu_available: bool,
}Expand description
Hardware capabilities detector (using core platform capabilities)
Fields§
§has_sse: bool§has_sse2: bool§has_sse3: bool§has_ssse3: bool§has_sse41: bool§has_sse42: bool§has_avx: bool§has_avx2: bool§has_avx512f: bool§has_fma: bool§has_gpu: bool§gpu_memory: Option<usize>§simd_available: bool§avx2_available: bool§avx512_available: bool§gpu_available: boolImplementations§
Source§impl HardwareCapabilities
impl HardwareCapabilities
Sourcepub fn optimal_vector_width(&self) -> VectorWidth
pub fn optimal_vector_width(&self) -> VectorWidth
Get optimal vector width for current hardware
Sourcepub fn simd_available(&self) -> bool
pub fn simd_available(&self) -> bool
Check if SIMD is available
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HardwareCapabilities
impl RefUnwindSafe for HardwareCapabilities
impl Send for HardwareCapabilities
impl Sync for HardwareCapabilities
impl Unpin for HardwareCapabilities
impl UnwindSafe for HardwareCapabilities
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.