1 From 6bfce5dc2cbf834c74dbccb7538adc08c6eb57e7 Mon Sep 17 00:00:00 2001
2 From: bjorn3 <bjorn3@users.noreply.github.com>
3 Date: Sun, 25 Jul 2021 18:39:31 +0200
4 Subject: [PATCH] Disable unsupported tests
7 crates/core_simd/src/vector.rs | 2 ++
8 crates/core_simd/src/math.rs | 4 ++++
9 crates/core_simd/tests/masks.rs | 12 ------------
10 crates/core_simd/tests/ops_macros.rs | 6 ++++++
11 crates/core_simd/tests/round.rs | 2 ++
12 6 files changed, 15 insertions(+), 13 deletions(-)
14 diff --git a/crates/core_simd/src/vector.rs b/crates/core_simd/src/vector.rs
15 index 25c5309..2b3d819 100644
16 --- a/crates/core_simd/src/vector.rs
17 +++ b/crates/core_simd/src/vector.rs
18 @@ -22,6 +22,7 @@ where
23 /// SIMD gather: construct a SIMD vector by reading from a slice, using potentially discontiguous indices.
24 /// If an index is out of bounds, that lane instead selects the value from the "or" vector.
26 @@ -150,6 +151,7 @@ where
27 // Cleared ☢️ *mut T Zone
33 impl<T, const LANES: usize> Copy for Simd<T, LANES>
34 diff --git a/crates/core_simd/src/math.rs b/crates/core_simd/src/math.rs
35 index 7290a28..e394730 100644
36 --- a/crates/core_simd/src/math.rs
37 +++ b/crates/core_simd/src/math.rs
38 @@ -2,6 +2,7 @@ macro_rules! impl_uint_arith {
40 $( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
43 /// Lanewise saturating add.
46 @@ -38,6 +39,7 @@ macro_rules! impl_uint_arith {
47 pub fn saturating_sub(self, second: Self) -> Self {
48 unsafe { crate::intrinsics::simd_saturating_sub(self, second) }
54 @@ -46,6 +48,7 @@ macro_rules! impl_int_arith {
56 $( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
59 /// Lanewise saturating add.
62 @@ -141,6 +144,7 @@ macro_rules! impl_int_arith {
63 pub fn saturating_neg(self) -> Self {
64 Self::splat(0).saturating_sub(self)
70 diff --git a/crates/core_simd/tests/masks.rs b/crates/core_simd/tests/masks.rs
71 index 61d8e44..2bccae2 100644
72 --- a/crates/core_simd/tests/masks.rs
73 +++ b/crates/core_simd/tests/masks.rs
74 @@ -67,18 +67,6 @@ macro_rules! test_mask_api {
75 assert_eq!(int.to_array(), [-1, 0, 0, -1, 0, 0, -1, 0]);
76 assert_eq!(core_simd::Mask::<$type, 8>::from_int(int), mask);
80 - fn roundtrip_bitmask_conversion() {
82 - true, false, false, true, false, false, true, false,
83 - true, true, false, false, false, false, false, true,
85 - let mask = core_simd::Mask::<$type, 16>::from_array(values);
86 - let bitmask = mask.to_bitmask();
87 - assert_eq!(bitmask, [0b01001001, 0b10000011]);
88 - assert_eq!(core_simd::Mask::<$type, 16>::from_bitmask(bitmask), mask);
93 diff --git a/crates/core_simd/tests/ops_macros.rs b/crates/core_simd/tests/ops_macros.rs
94 index cb39e73..fc0ebe1 100644
95 --- a/crates/core_simd/tests/ops_macros.rs
96 +++ b/crates/core_simd/tests/ops_macros.rs
97 @@ -435,6 +435,7 @@ macro_rules! impl_float_tests {
102 fn mul_add<const LANES: usize>() {
103 test_helpers::test_ternary_elementwise(
104 &Vector::<LANES>::mul_add,
105 @@ -442,6 +443,7 @@ macro_rules! impl_float_tests {
111 fn recip<const LANES: usize>() {
112 test_helpers::test_unary_elementwise(
113 @@ -581,6 +585,7 @@ macro_rules! impl_float_tests {
118 fn horizontal_max<const LANES: usize>() {
119 test_helpers::test_1(&|x| {
120 let vmax = Vector::<LANES>::from_array(x).horizontal_max();
121 @@ -604,6 +609,7 @@ macro_rules! impl_float_tests {
128 #[cfg(feature = "std")]
129 diff --git a/crates/core_simd/tests/round.rs b/crates/core_simd/tests/round.rs
130 index 37044a7..4cdc6b7 100644
131 --- a/crates/core_simd/tests/round.rs
132 +++ b/crates/core_simd/tests/round.rs
133 @@ -25,6 +25,7 @@ macro_rules! float_rounding_test {
138 fn round<const LANES: usize>() {
139 test_helpers::test_unary_elementwise(
140 &Vector::<LANES>::round,
141 @@ -32,6 +33,7 @@ macro_rules! float_rounding_test {
147 fn trunc<const LANES: usize>() {
148 test_helpers::test_unary_elementwise(