pub struct SIMDConfig {
pub enabled: bool,
pub vector_width: usize,
pub alignment: usize,
pub min_simd_size: usize,
}Expand description
Configuration for SIMD operations
Fields§
§enabled: boolWhether SIMD is enabled
vector_width: usizeVector width (in bytes)
alignment: usizeAlignment requirement
min_simd_size: usizeMinimum data size to use SIMD
Implementations§
Source§impl SIMDConfig
impl SIMDConfig
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Enable or disable SIMD
Sourcepub fn with_vector_width(self, width: usize) -> Self
pub fn with_vector_width(self, width: usize) -> Self
Set vector width
Sourcepub fn with_alignment(self, alignment: usize) -> Self
pub fn with_alignment(self, alignment: usize) -> Self
Set alignment requirement
Sourcepub fn with_min_simd_size(self, size: usize) -> Self
pub fn with_min_simd_size(self, size: usize) -> Self
Set minimum size for SIMD operations
Sourcepub fn should_use_simd(&self, data_size: usize) -> bool
pub fn should_use_simd(&self, data_size: usize) -> bool
Check if SIMD should be used for given data size
Trait Implementations§
Source§impl Clone for SIMDConfig
impl Clone for SIMDConfig
Source§fn clone(&self) -> SIMDConfig
fn clone(&self) -> SIMDConfig
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 SIMDConfig
impl Debug for SIMDConfig
Auto Trait Implementations§
impl Freeze for SIMDConfig
impl RefUnwindSafe for SIMDConfig
impl Send for SIMDConfig
impl Sync for SIMDConfig
impl Unpin for SIMDConfig
impl UnsafeUnpin for SIMDConfig
impl UnwindSafe for SIMDConfig
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