SimdOrd in core::simd::cmp - Rust (original) (raw)

pub trait SimdOrd: SimdPartialOrd {
    // Required methods
    fn simd_max(self, other: Self) -> Self;
    fn simd_min(self, other: Self) -> Self;
    fn simd_clamp(self, min: Self, max: Self) -> Self;
}

🔬This is a nightly-only experimental API. (portable_simd #86656)

Expand description

Parallel Ord.

Source

🔬This is a nightly-only experimental API. (portable_simd #86656)

Returns the element-wise maximum with other.

Source

🔬This is a nightly-only experimental API. (portable_simd #86656)

Returns the element-wise minimum with other.

Source

🔬This is a nightly-only experimental API. (portable_simd #86656)

Restrict each element to a certain interval.

For each element, 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 element.

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.