pub trait SimdSaturatingArithmetic: SimdBase {
// Required methods
fn saturating_add(&self, other: Self) -> Self;
fn saturating_sub(&self, other: Self) -> Self;
}Expand description
A vector supporting saturating arithmetic on each entry.
Saturating operations clamp their outputs to the scalar’s maximum or minimum value on overflow/underflow.
Required Methods§
Sourcefn saturating_add(&self, other: Self) -> Self
fn saturating_add(&self, other: Self) -> Self
Pairwise add vectors. On overflow, the entry’s value goes to the maximum scalar value.
Sourcefn saturating_sub(&self, other: Self) -> Self
fn saturating_sub(&self, other: Self) -> Self
Pairwise add vectors. On overflow, the entry’s value goes to the minimum scalar value.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.