diff --git a/crates/core_simd/src/vector.rs b/crates/core_simd/src/vector.rs index 7c5ec2bc314..7761df59623 100644 --- a/crates/core_simd/src/vector.rs +++ b/crates/core_simd/src/vector.rs @@ -330,12 +330,13 @@ where impl PartialEq for Simd where LaneCount: SupportedLaneCount, - T: SimdElement + PartialEq, + T: SimdElement, { #[inline] fn eq(&self, other: &Self) -> bool { - // TODO use SIMD equality - self.to_array() == other.to_array() + unsafe { + intrinsics::simd_reduce_all(intrinsics::simd_eq::>(*self, *other)) + } } } @@ -346,7 +347,7 @@ where { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - // TODO use SIMD equality + // TODO: use SIMD comparsion self.to_array().partial_cmp(other.as_ref()) } } @@ -365,7 +366,7 @@ where { #[inline] fn cmp(&self, other: &Self) -> core::cmp::Ordering { - // TODO use SIMD equality + // TODO: use SIMD comparsion self.to_array().cmp(other.as_ref()) } }