e
Diffstat (limited to 'src/color/simd.rs')
-rwxr-xr-xsrc/color/simd.rs37
1 files changed, 8 insertions, 29 deletions
diff --git a/src/color/simd.rs b/src/color/simd.rs
index 3b0e593..78b1f76 100755
--- a/src/color/simd.rs
+++ b/src/color/simd.rs
@@ -1,17 +1,11 @@
use std::ops::{Add, AddAssign, Div, Mul, Sub, SubAssign};
-
-pub use std::simd::{LaneCount, Simd, SupportedLaneCount};
+use std::simd::prelude::*;
#[derive(Copy, Clone, Eq, PartialEq, Debug, Default)]
#[allow(non_camel_case_types)]
-pub struct u32xN<const N: usize>(pub Simd<u32, N>)
-where
- LaneCount<N>: SupportedLaneCount;
+pub struct u32xN<const N: usize>(pub Simd<u32, N>);
-impl<const N: usize> Add for u32xN<N>
-where
- LaneCount<N>: SupportedLaneCount,
-{
+impl<const N: usize> Add for u32xN<N> {
type Output = Self;
fn add(self, rhs: Self) -> Self::Output {
@@ -19,10 +13,7 @@ where
}
}
-impl<const N: usize> Sub for u32xN<N>
-where
- LaneCount<N>: SupportedLaneCount,
-{
+impl<const N: usize> Sub for u32xN<N> {
type Output = Self;
fn sub(self, rhs: Self) -> Self::Output {
@@ -30,28 +21,19 @@ where
}
}
-impl<const N: usize> AddAssign for u32xN<N>
-where
- LaneCount<N>: SupportedLaneCount,
-{
+impl<const N: usize> AddAssign for u32xN<N> {
fn add_assign(&mut self, rhs: Self) {
self.0 += rhs.0;
}
}
-impl<const N: usize> SubAssign for u32xN<N>
-where
- LaneCount<N>: SupportedLaneCount,
-{
+impl<const N: usize> SubAssign for u32xN<N> {
fn sub_assign(&mut self, rhs: Self) {
self.0 -= rhs.0;
}
}
-impl<const N: usize> Mul<usize> for u32xN<N>
-where
- LaneCount<N>: SupportedLaneCount,
-{
+impl<const N: usize> Mul<usize> for u32xN<N> {
type Output = Self;
fn mul(self, rhs: usize) -> Self::Output {
@@ -59,10 +41,7 @@ where
}
}
-impl<const N: usize> Div<usize> for u32xN<N>
-where
- LaneCount<N>: SupportedLaneCount,
-{
+impl<const N: usize> Div<usize> for u32xN<N> {
type Output = Self;
fn div(self, rhs: usize) -> Self::Output {