On this page
Trait std::simd::SimdOrd
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)
Parallel Ord
.
Required Methods
fn simd_max(self, other: Self) -> Self
🔬This is a nightly-only experimental API. (
portable_simd
#86656)
Returns the lane-wise maximum with other
.
fn simd_min(self, other: Self) -> Self
🔬This is a nightly-only experimental API. (
portable_simd
#86656)
Returns the lane-wise minimum with other
.
fn simd_clamp(self, min: Self, max: Self) -> Self
🔬This is a nightly-only experimental API. (
portable_simd
#86656)
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.
Object Safety
This trait is not object safe.
Implementors
impl<T, const LANES: usize> SimdOrd for Simd<*const T, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> SimdOrd for Simd<*mut T, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Mask<i8, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Mask<i16, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Mask<i32, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Mask<i64, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Mask<isize, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Simd<i8, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Simd<i16, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Simd<i32, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Simd<i64, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Simd<isize, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Simd<u8, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Simd<u16, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Simd<u32, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Simd<u64, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
impl<const LANES: usize> SimdOrd for Simd<usize, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/simd/trait.SimdOrd.html