pub struct SimdCounter { /* private fields */ }Expand description
Performance counter for tracking SIMD optimization usage.
This counter tracks the ratio of vectorized vs scalar operations to help optimize performance-critical code paths.
Implementations§
Source§impl SimdCounter
impl SimdCounter
Sourcepub fn record_vectorized_op(&self, elements: usize)
pub fn record_vectorized_op(&self, elements: usize)
Record a vectorized operation with the number of elements processed.
Sourcepub fn record_scalar_op(&self, elements: usize)
pub fn record_scalar_op(&self, elements: usize)
Record a scalar operation with the number of elements processed.
Sourcepub fn vectorized_ops(&self) -> usize
pub fn vectorized_ops(&self) -> usize
Get the total number of vectorized operations performed.
Sourcepub fn scalar_ops(&self) -> usize
pub fn scalar_ops(&self) -> usize
Get the total number of scalar operations performed.
Sourcepub fn vectorization_rate(&self) -> f64
pub fn vectorization_rate(&self) -> f64
Calculate the vectorization rate as a fraction of total operations.
Trait Implementations§
Source§impl Debug for SimdCounter
impl Debug for SimdCounter
Auto Trait Implementations§
impl !Freeze for SimdCounter
impl RefUnwindSafe for SimdCounter
impl Send for SimdCounter
impl Sync for SimdCounter
impl Unpin for SimdCounter
impl UnsafeUnpin for SimdCounter
impl UnwindSafe for SimdCounter
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