pub struct SIMDOptimizer {
pub simd_capabilities: SIMDCapabilities,
pub optimization_level: OptimizationLevel,
pub vectorized_operations: HashMap<String, VectorizedOperation>,
}Expand description
SIMD optimizer
Fields§
§simd_capabilities: SIMDCapabilities§optimization_level: OptimizationLevel§vectorized_operations: HashMap<String, VectorizedOperation>Implementations§
Source§impl SIMDOptimizer
impl SIMDOptimizer
pub fn new() -> Self
Sourcepub fn initialize(&mut self) -> Result<(), LinearAlgebraError>
pub fn initialize(&mut self) -> Result<(), LinearAlgebraError>
Probe the running CPU and populate the SIMD capability set.
On x86_64 this queries SSE2, SSE4.1, SSE4.2, AVX, AVX2, AVX-512 and
FMA via std::arch::is_x86_feature_detected! (CPUID at runtime). On
aarch64 it reports NEON. On any other architecture the capability set
is left empty (scalar fallback).
Sourcepub fn capabilities(&self) -> &SIMDCapabilities
pub fn capabilities(&self) -> &SIMDCapabilities
Returns a reference to the runtime-detected SIMD capabilities.
Sourcepub fn has_feature(&self, instruction: &SIMDInstruction) -> bool
pub fn has_feature(&self, instruction: &SIMDInstruction) -> bool
Checks whether a specific SIMD instruction set is available on the
current CPU. Returns true when the given instruction was detected
during initialize() (or SIMDCapabilities::detect()).
Auto Trait Implementations§
impl Freeze for SIMDOptimizer
impl RefUnwindSafe for SIMDOptimizer
impl Send for SIMDOptimizer
impl Sync for SIMDOptimizer
impl Unpin for SIMDOptimizer
impl UnsafeUnpin for SIMDOptimizer
impl UnwindSafe for SIMDOptimizer
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§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