pub struct SimdCapabilities {
pub instruction_sets: Vec<SimdInstructionSet>,
pub architecture: CpuArchitecture,
pub num_cores: usize,
pub cache_line_size: usize,
pub l1_cache_size: usize,
pub l2_cache_size: usize,
pub l3_cache_size: usize,
}Expand description
SIMD capabilities detection.
Fields§
§instruction_sets: Vec<SimdInstructionSet>Available instruction sets
architecture: CpuArchitectureCPU architecture
num_cores: usizeNumber of CPU cores
cache_line_size: usizeCache line size (bytes)
l1_cache_size: usizeL1 cache size (bytes)
l2_cache_size: usizeL2 cache size (bytes)
l3_cache_size: usizeL3 cache size (bytes)
Implementations§
Source§impl SimdCapabilities
impl SimdCapabilities
Sourcepub fn has_instruction_set(&self, isa: SimdInstructionSet) -> bool
pub fn has_instruction_set(&self, isa: SimdInstructionSet) -> bool
Check if a specific instruction set is available.
Sourcepub fn has_avx512(&self) -> bool
pub fn has_avx512(&self) -> bool
Check if AVX-512 is available.
Sourcepub fn best_instruction_set(&self) -> SimdInstructionSet
pub fn best_instruction_set(&self) -> SimdInstructionSet
Get the best available instruction set.
Sourcepub fn recommended_vector_size(&self, element_size: usize) -> usize
pub fn recommended_vector_size(&self, element_size: usize) -> usize
Get the recommended vectorization factor for a given element size.
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§impl<'de> Deserialize<'de> for SimdCapabilities
impl<'de> Deserialize<'de> for SimdCapabilities
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SimdCapabilities
impl PartialEq for SimdCapabilities
Source§impl Serialize for SimdCapabilities
impl Serialize for SimdCapabilities
impl Eq for SimdCapabilities
impl StructuralPartialEq 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 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