Skip to content

Commit 60486e0

Browse files
committed
SimdPartialOrd implies SimdPartialEq
1 parent 2a02c4d commit 60486e0

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

crates/core_simd/src/ord.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
use crate::simd::{intrinsics, LaneCount, Mask, Simd, SimdElement, SupportedLaneCount};
1+
use crate::simd::{intrinsics, LaneCount, Mask, Simd, SimdPartialEq, SupportedLaneCount};
22

33
/// Parallel `PartialOrd`.
4-
pub trait SimdPartialOrd {
5-
/// The mask type returned by each comparison.
6-
type Mask;
7-
4+
pub trait SimdPartialOrd: SimdPartialEq {
85
/// Test if each lane is less than the corresponding lane in `other`.
96
#[must_use = "method returns a new mask and does not mutate the original value"]
107
fn simd_lt(self, other: Self) -> Self::Mask;
@@ -51,8 +48,6 @@ macro_rules! impl_integer {
5148
where
5249
LaneCount<LANES>: SupportedLaneCount,
5350
{
54-
type Mask = Mask<<$integer as SimdElement>::Mask, LANES>;
55-
5651
#[inline]
5752
fn simd_lt(self, other: Self) -> Self::Mask {
5853
// Safety: `self` is a vector, and the result of the comparison
@@ -118,8 +113,6 @@ macro_rules! impl_float {
118113
where
119114
LaneCount<LANES>: SupportedLaneCount,
120115
{
121-
type Mask = Mask<<$float as SimdElement>::Mask, LANES>;
122-
123116
#[inline]
124117
fn simd_lt(self, other: Self) -> Self::Mask {
125118
// Safety: `self` is a vector, and the result of the comparison
@@ -161,8 +154,6 @@ macro_rules! impl_mask {
161154
where
162155
LaneCount<LANES>: SupportedLaneCount,
163156
{
164-
type Mask = Self;
165-
166157
#[inline]
167158
fn simd_lt(self, other: Self) -> Self::Mask {
168159
// Safety: `self` is a vector, and the result of the comparison

0 commit comments

Comments
 (0)