From 92d643b6283b0171873de4c46f708005af025f33 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sun, 25 Apr 2021 16:40:35 -0700 Subject: [PATCH] Remove Simd{U,I}128 --- crates/core_simd/src/comparisons.rs | 2 -- crates/core_simd/src/fmt.rs | 4 ++-- crates/core_simd/src/lanes_at_most_32.rs | 2 -- crates/core_simd/src/lib.rs | 4 ++-- crates/core_simd/src/masks/full_masks.rs | 6 ------ crates/core_simd/src/masks/mod.rs | 16 +--------------- crates/core_simd/src/math.rs | 4 ++-- crates/core_simd/src/ops.rs | 2 -- crates/core_simd/src/vector/int.rs | 17 ----------------- crates/core_simd/src/vector/uint.rs | 17 ----------------- crates/core_simd/tests/i128_ops.rs | 3 --- crates/core_simd/tests/mask_ops_impl/mask128.rs | 2 -- crates/core_simd/tests/mask_ops_impl/mod.rs | 1 - crates/core_simd/tests/u128_ops.rs | 3 --- crates/test_helpers/src/lib.rs | 4 ---- 15 files changed, 7 insertions(+), 80 deletions(-) delete mode 100644 crates/core_simd/tests/i128_ops.rs delete mode 100644 crates/core_simd/tests/mask_ops_impl/mask128.rs delete mode 100644 crates/core_simd/tests/u128_ops.rs diff --git a/crates/core_simd/src/comparisons.rs b/crates/core_simd/src/comparisons.rs index 455f30dc97eed..988ff857eab5d 100644 --- a/crates/core_simd/src/comparisons.rs +++ b/crates/core_simd/src/comparisons.rs @@ -71,14 +71,12 @@ implement_mask_ops! { SimdI16 => Mask16 (SimdMask16, SimdI16), SimdI32 => Mask32 (SimdMask32, SimdI32), SimdI64 => Mask64 (SimdMask64, SimdI64), - SimdI128 => Mask128 (SimdMask128, SimdI128), SimdIsize => MaskSize (SimdMaskSize, SimdIsize), SimdU8 => Mask8 (SimdMask8, SimdI8), SimdU16 => Mask16 (SimdMask16, SimdI16), SimdU32 => Mask32 (SimdMask32, SimdI32), SimdU64 => Mask64 (SimdMask64, SimdI64), - SimdU128 => Mask128 (SimdMask128, SimdI128), SimdUsize => MaskSize (SimdMaskSize, SimdIsize), SimdF32 => Mask32 (SimdMask32, SimdI32), diff --git a/crates/core_simd/src/fmt.rs b/crates/core_simd/src/fmt.rs index faf0c20e922e5..1d5010843eb75 100644 --- a/crates/core_simd/src/fmt.rs +++ b/crates/core_simd/src/fmt.rs @@ -77,8 +77,8 @@ macro_rules! impl_fmt_trait { impl_fmt_trait! { integers: - SimdU8, SimdU16, SimdU32, SimdU64, SimdU128, - SimdI8, SimdI16, SimdI32, SimdI64, SimdI128, + SimdU8, SimdU16, SimdU32, SimdU64, + SimdI8, SimdI16, SimdI32, SimdI64, SimdUsize, SimdIsize, } diff --git a/crates/core_simd/src/lanes_at_most_32.rs b/crates/core_simd/src/lanes_at_most_32.rs index dc0e02c22a262..1e2f7e952c62c 100644 --- a/crates/core_simd/src/lanes_at_most_32.rs +++ b/crates/core_simd/src/lanes_at_most_32.rs @@ -18,14 +18,12 @@ impl_for! { SimdU8 } impl_for! { SimdU16 } impl_for! { SimdU32 } impl_for! { SimdU64 } -impl_for! { SimdU128 } impl_for! { SimdUsize } impl_for! { SimdI8 } impl_for! { SimdI16 } impl_for! { SimdI32 } impl_for! { SimdI64 } -impl_for! { SimdI128 } impl_for! { SimdIsize } impl_for! { SimdF32 } diff --git a/crates/core_simd/src/lib.rs b/crates/core_simd/src/lib.rs index 0fc2641516dd6..2d4176ce342c0 100644 --- a/crates/core_simd/src/lib.rs +++ b/crates/core_simd/src/lib.rs @@ -22,8 +22,8 @@ mod round; mod math; -mod lanes_at_most_64; -pub use lanes_at_most_64::LanesAtMost32; +mod lanes_at_most_32; +pub use lanes_at_most_32::LanesAtMost32; mod masks; pub use masks::*; diff --git a/crates/core_simd/src/masks/full_masks.rs b/crates/core_simd/src/masks/full_masks.rs index a6689ce48c665..60a6cb5fdbe87 100644 --- a/crates/core_simd/src/masks/full_masks.rs +++ b/crates/core_simd/src/masks/full_masks.rs @@ -417,12 +417,6 @@ define_mask! { struct SimdMask64(crate::SimdI64); } -define_mask! { - /// A mask equivalent to [SimdI128](crate::SimdI128), where all bits in the lane must be either set - /// or unset. - struct SimdMask128(crate::SimdI128); -} - define_mask! { /// A mask equivalent to [SimdIsize](crate::SimdIsize), where all bits in the lane must be either set /// or unset. diff --git a/crates/core_simd/src/masks/mod.rs b/crates/core_simd/src/masks/mod.rs index 4503187e4b8a8..c394c7003a355 100644 --- a/crates/core_simd/src/masks/mod.rs +++ b/crates/core_simd/src/masks/mod.rs @@ -7,7 +7,7 @@ pub use full_masks::*; mod bitmask; pub use bitmask::*; -use crate::{LanesAtMost32, SimdI128, SimdI16, SimdI32, SimdI64, SimdI8, SimdIsize}; +use crate::{LanesAtMost32, SimdI16, SimdI32, SimdI64, SimdI8, SimdIsize}; macro_rules! define_opaque_mask { { @@ -387,14 +387,6 @@ define_opaque_mask! { @bits SimdI64 } -define_opaque_mask! { - /// Mask for vectors with `LANES` 128-bit elements. - /// - /// The layout of this type is unspecified. - struct Mask128(SimdMask128); - @bits SimdI128 -} - define_opaque_mask! { /// Mask for vectors with `LANES` pointer-width elements. /// @@ -448,12 +440,6 @@ pub type mask64x4 = Mask64<4>; /// Vector of eight 64-bit masks pub type mask64x8 = Mask64<8>; -/// Vector of two 128-bit masks -pub type mask128x2 = Mask128<2>; - -/// Vector of four 128-bit masks -pub type mask128x4 = Mask128<4>; - /// Vector of two pointer-width masks pub type masksizex2 = MaskSize<2>; diff --git a/crates/core_simd/src/math.rs b/crates/core_simd/src/math.rs index 50e8f2c10c9bb..6a243dbd1962c 100644 --- a/crates/core_simd/src/math.rs +++ b/crates/core_simd/src/math.rs @@ -140,5 +140,5 @@ macro_rules! impl_int_arith { use crate::vector::*; -impl_uint_arith! { (SimdU8, u8), (SimdU16, u16), (SimdU32, u32), (SimdU64, u64), (SimdU128, u128), (SimdUsize, usize) } -impl_int_arith! { (SimdI8, i8), (SimdI16, i16), (SimdI32, i32), (SimdI64, i64), (SimdI128, i128), (SimdIsize, isize) } +impl_uint_arith! { (SimdU8, u8), (SimdU16, u16), (SimdU32, u32), (SimdU64, u64), (SimdUsize, usize) } +impl_int_arith! { (SimdI8, i8), (SimdI16, i16), (SimdI32, i32), (SimdI64, i64), (SimdIsize, isize) } diff --git a/crates/core_simd/src/ops.rs b/crates/core_simd/src/ops.rs index 513eeb423d926..c7037d2acbc61 100644 --- a/crates/core_simd/src/ops.rs +++ b/crates/core_simd/src/ops.rs @@ -653,7 +653,6 @@ impl_unsigned_int_ops! { u16 => SimdU16; u32 => SimdU32; u64 => SimdU64; - u128 => SimdU128; usize => SimdUsize; } @@ -662,7 +661,6 @@ impl_signed_int_ops! { i16 => SimdI16; i32 => SimdI32; i64 => SimdI64; - i128 => SimdI128; isize => SimdIsize; } diff --git a/crates/core_simd/src/vector/int.rs b/crates/core_simd/src/vector/int.rs index 24f77cb3e106a..30b09a229e9b0 100644 --- a/crates/core_simd/src/vector/int.rs +++ b/crates/core_simd/src/vector/int.rs @@ -64,17 +64,6 @@ from_transmute_x86! { unsafe isizex4 => __m256i } //#[cfg(target_pointer_width = "64")] //from_transmute_x86! { unsafe isizex8 => __m512i } -/// A SIMD vector of containing `LANES` `i128` values. -#[repr(simd)] -pub struct SimdI128([i128; LANES]) -where - Self: crate::LanesAtMost32; - -impl_integer_vector! { SimdI128, i128, Mask128, SimdI128 } - -from_transmute_x86! { unsafe i128x2 => __m256i } -//from_transmute_x86! { unsafe i128x4 => __m512i } - /// A SIMD vector of containing `LANES` `i16` values. #[repr(simd)] pub struct SimdI16([i16; LANES]) @@ -132,12 +121,6 @@ pub type isizex4 = SimdIsize<4>; /// Vector of eight `isize` values pub type isizex8 = SimdIsize<8>; -/// Vector of two `i128` values -pub type i128x2 = SimdI128<2>; - -/// Vector of four `i128` values -pub type i128x4 = SimdI128<4>; - /// Vector of four `i16` values pub type i16x4 = SimdI16<4>; diff --git a/crates/core_simd/src/vector/uint.rs b/crates/core_simd/src/vector/uint.rs index 3866b9ca5c6ef..53e780520a79d 100644 --- a/crates/core_simd/src/vector/uint.rs +++ b/crates/core_simd/src/vector/uint.rs @@ -49,17 +49,6 @@ from_transmute_x86! { unsafe usizex4 => __m256i } //#[cfg(target_pointer_width = "64")] //from_transmute_x86! { unsafe usizex8 => __m512i } -/// A SIMD vector of containing `LANES` `u128` values. -#[repr(simd)] -pub struct SimdU128([u128; LANES]) -where - Self: crate::LanesAtMost32; - -impl_unsigned_vector! { SimdU128, u128 } - -from_transmute_x86! { unsafe u128x2 => __m256i } -//from_transmute_x86! { unsafe u128x4 => __m512i } - /// A SIMD vector of containing `LANES` `u16` values. #[repr(simd)] pub struct SimdU16([u16; LANES]) @@ -117,12 +106,6 @@ pub type usizex4 = SimdUsize<4>; /// Vector of eight `usize` values pub type usizex8 = SimdUsize<8>; -/// Vector of two `u128` values -pub type u128x2 = SimdU128<2>; - -/// Vector of four `u128` values -pub type u128x4 = SimdU128<4>; - /// Vector of four `u16` values pub type u16x4 = SimdU16<4>; diff --git a/crates/core_simd/tests/i128_ops.rs b/crates/core_simd/tests/i128_ops.rs deleted file mode 100644 index 3e3fa1d20682b..0000000000000 --- a/crates/core_simd/tests/i128_ops.rs +++ /dev/null @@ -1,3 +0,0 @@ -#[macro_use] -mod ops_macros; -impl_signed_tests! { SimdI128, i128 } diff --git a/crates/core_simd/tests/mask_ops_impl/mask128.rs b/crates/core_simd/tests/mask_ops_impl/mask128.rs deleted file mode 100644 index 27ba4e2d29fe6..0000000000000 --- a/crates/core_simd/tests/mask_ops_impl/mask128.rs +++ /dev/null @@ -1,2 +0,0 @@ -mask_tests! { mask128x2, 2 } -mask_tests! { mask128x4, 4 } diff --git a/crates/core_simd/tests/mask_ops_impl/mod.rs b/crates/core_simd/tests/mask_ops_impl/mod.rs index 99d735be29356..ff36af956515e 100644 --- a/crates/core_simd/tests/mask_ops_impl/mod.rs +++ b/crates/core_simd/tests/mask_ops_impl/mod.rs @@ -5,5 +5,4 @@ mod mask8; mod mask16; mod mask32; mod mask64; -mod mask128; mod masksize; diff --git a/crates/core_simd/tests/u128_ops.rs b/crates/core_simd/tests/u128_ops.rs deleted file mode 100644 index 4be7d751ffd89..0000000000000 --- a/crates/core_simd/tests/u128_ops.rs +++ /dev/null @@ -1,3 +0,0 @@ -#[macro_use] -mod ops_macros; -impl_unsigned_tests! { SimdU128, u128 } diff --git a/crates/test_helpers/src/lib.rs b/crates/test_helpers/src/lib.rs index b5bfd96dde854..9e8790842b492 100644 --- a/crates/test_helpers/src/lib.rs +++ b/crates/test_helpers/src/lib.rs @@ -273,13 +273,11 @@ macro_rules! test_lanes { core_simd::SimdU16<$lanes>: core_simd::LanesAtMost32, core_simd::SimdU32<$lanes>: core_simd::LanesAtMost32, core_simd::SimdU64<$lanes>: core_simd::LanesAtMost32, - core_simd::SimdU128<$lanes>: core_simd::LanesAtMost32, core_simd::SimdUsize<$lanes>: core_simd::LanesAtMost32, core_simd::SimdI8<$lanes>: core_simd::LanesAtMost32, core_simd::SimdI16<$lanes>: core_simd::LanesAtMost32, core_simd::SimdI32<$lanes>: core_simd::LanesAtMost32, core_simd::SimdI64<$lanes>: core_simd::LanesAtMost32, - core_simd::SimdI128<$lanes>: core_simd::LanesAtMost32, core_simd::SimdIsize<$lanes>: core_simd::LanesAtMost32, core_simd::SimdF32<$lanes>: core_simd::LanesAtMost32, core_simd::SimdF64<$lanes>: core_simd::LanesAtMost32, @@ -345,13 +343,11 @@ macro_rules! test_lanes_panic { core_simd::SimdU16<$lanes>: core_simd::LanesAtMost32, core_simd::SimdU32<$lanes>: core_simd::LanesAtMost32, core_simd::SimdU64<$lanes>: core_simd::LanesAtMost32, - core_simd::SimdU128<$lanes>: core_simd::LanesAtMost32, core_simd::SimdUsize<$lanes>: core_simd::LanesAtMost32, core_simd::SimdI8<$lanes>: core_simd::LanesAtMost32, core_simd::SimdI16<$lanes>: core_simd::LanesAtMost32, core_simd::SimdI32<$lanes>: core_simd::LanesAtMost32, core_simd::SimdI64<$lanes>: core_simd::LanesAtMost32, - core_simd::SimdI128<$lanes>: core_simd::LanesAtMost32, core_simd::SimdIsize<$lanes>: core_simd::LanesAtMost32, core_simd::SimdF32<$lanes>: core_simd::LanesAtMost32, core_simd::SimdF64<$lanes>: core_simd::LanesAtMost32,