diff --git a/src/compute/aggregate/simd/packed.rs b/src/compute/aggregate/simd/packed.rs index c3ee4ffcf32..809bac7a58f 100644 --- a/src/compute/aggregate/simd/packed.rs +++ b/src/compute/aggregate/simd/packed.rs @@ -1,4 +1,4 @@ -use std::simd::{SimdFloat as _, SimdInt as _, SimdOrd as _, SimdUint as _}; +use std::simd::prelude::*; use crate::types::simd::*; @@ -35,31 +35,37 @@ macro_rules! simd_ord_int { #[inline] fn max_element(self) -> $type { + use std::simd::prelude::*; self.reduce_max() } #[inline] fn min_element(self) -> $type { + use std::simd::prelude::*; self.reduce_min() } #[inline] fn max_lane(self, x: Self) -> Self { + use std::simd::prelude::*; self.simd_max(x) } #[inline] fn min_lane(self, x: Self) -> Self { + use std::simd::prelude::*; self.simd_min(x) } #[inline] fn new_min() -> Self { + use std::simd::prelude::*; Self::splat(Self::MAX) } #[inline] fn new_max() -> Self { + use std::simd::prelude::*; Self::splat(Self::MIN) } } diff --git a/src/compute/comparison/simd/packed.rs b/src/compute/comparison/simd/packed.rs index 937e3bb81a2..731227b5caa 100644 --- a/src/compute/comparison/simd/packed.rs +++ b/src/compute/comparison/simd/packed.rs @@ -1,5 +1,5 @@ use std::convert::TryInto; -use std::simd::{SimdPartialEq, SimdPartialOrd, ToBitMask}; +use std::simd::prelude::*; use crate::types::simd::*; use crate::types::{days_ms, f16, i256, months_days_ns}; @@ -29,34 +29,40 @@ macro_rules! simd8 { impl Simd8PartialEq for $md { #[inline] fn eq(self, other: Self) -> u8 { - self.simd_eq(other).to_bitmask() + use std::simd::prelude::*; + self.simd_eq(other).to_bitmask().try_into().unwrap() } #[inline] fn neq(self, other: Self) -> u8 { - self.simd_ne(other).to_bitmask() + use std::simd::prelude::*; + self.simd_ne(other).to_bitmask().try_into().unwrap() } } impl Simd8PartialOrd for $md { #[inline] fn lt_eq(self, other: Self) -> u8 { - self.simd_le(other).to_bitmask() + use std::simd::prelude::*; + self.simd_le(other).to_bitmask().try_into().unwrap() } #[inline] fn lt(self, other: Self) -> u8 { - self.simd_lt(other).to_bitmask() + use std::simd::prelude::*; + self.simd_lt(other).to_bitmask().try_into().unwrap() } #[inline] fn gt_eq(self, other: Self) -> u8 { - self.simd_ge(other).to_bitmask() + use std::simd::prelude::*; + self.simd_ge(other).to_bitmask().try_into().unwrap() } #[inline] fn gt(self, other: Self) -> u8 { - self.simd_gt(other).to_bitmask() + use std::simd::prelude::*; + self.simd_gt(other).to_bitmask().try_into().unwrap() } } }; diff --git a/src/types/simd/packed.rs b/src/types/simd/packed.rs index 0d95b68882a..048d3b5d757 100644 --- a/src/types/simd/packed.rs +++ b/src/types/simd/packed.rs @@ -1,7 +1,7 @@ pub use std::simd::{ f32x16, f32x8, f64x8, i16x32, i16x8, i32x16, i32x8, i64x8, i8x64, i8x8, mask32x16 as m32x16, - mask64x8 as m64x8, mask8x64 as m8x64, u16x32, u16x8, u32x16, u32x8, u64x8, u8x64, u8x8, - SimdPartialEq, + mask64x8 as m64x8, mask8x64 as m8x64, prelude::*, u16x32, u16x8, u32x16, u32x8, u64x8, u8x64, + u8x8, }; /// Vector of 32 16-bit masks