Skip to content

Commit

Permalink
SimdPartialOrd implies SimdPartialEq
Browse files Browse the repository at this point in the history
  • Loading branch information
calebzulawski committed Mar 15, 2022
1 parent 2a02c4d commit 60486e0
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions crates/core_simd/src/ord.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use crate::simd::{intrinsics, LaneCount, Mask, Simd, SimdElement, SupportedLaneCount};
use crate::simd::{intrinsics, LaneCount, Mask, Simd, SimdPartialEq, SupportedLaneCount};

/// Parallel `PartialOrd`.
pub trait SimdPartialOrd {
/// The mask type returned by each comparison.
type Mask;

pub trait SimdPartialOrd: SimdPartialEq {
/// Test if each lane is less than the corresponding lane in `other`.
#[must_use = "method returns a new mask and does not mutate the original value"]
fn simd_lt(self, other: Self) -> Self::Mask;
Expand Down Expand Up @@ -51,8 +48,6 @@ macro_rules! impl_integer {
where
LaneCount<LANES>: SupportedLaneCount,
{
type Mask = Mask<<$integer as SimdElement>::Mask, LANES>;

#[inline]
fn simd_lt(self, other: Self) -> Self::Mask {
// Safety: `self` is a vector, and the result of the comparison
Expand Down Expand Up @@ -118,8 +113,6 @@ macro_rules! impl_float {
where
LaneCount<LANES>: SupportedLaneCount,
{
type Mask = Mask<<$float as SimdElement>::Mask, LANES>;

#[inline]
fn simd_lt(self, other: Self) -> Self::Mask {
// Safety: `self` is a vector, and the result of the comparison
Expand Down Expand Up @@ -161,8 +154,6 @@ macro_rules! impl_mask {
where
LaneCount<LANES>: SupportedLaneCount,
{
type Mask = Self;

#[inline]
fn simd_lt(self, other: Self) -> Self::Mask {
// Safety: `self` is a vector, and the result of the comparison
Expand Down

0 comments on commit 60486e0

Please sign in to comment.