pub trait SimdOrd: SimdPartialOrd {
fn simd_max(self, other: Self) -> Self;
fn simd_min(self, other: Self) -> Self;
fn simd_clamp(self, min: Self, max: Self) -> Self;
}
Expand description
Parallel Ord
.
Required Methods
Returns the lane-wise maximum with other
.
Returns the lane-wise minimum with other
.
fn simd_clamp(self, min: Self, max: Self) -> Self
fn simd_clamp(self, min: Self, max: Self) -> Self
Restrict each lane to a certain interval.
For each lane, returns max
if self
is greater than max
, and min
if self
is
less than min
. Otherwise returns self
.
Panics
Panics if min > max
on any lane.