|
1 |
| -From 6bfce5dc2cbf834c74dbccb7538adc08c6eb57e7 Mon Sep 17 00:00:00 2001 |
| 1 | +From 97c473937382a5b5858d9cce3c947855d23b2dc5 Mon Sep 17 00:00:00 2001 |
2 | 2 |
|
3 |
| -Date: Sun, 25 Jul 2021 18:39:31 +0200 |
| 3 | +Date: Thu, 18 Nov 2021 19:28:40 +0100 |
4 | 4 | Subject: [PATCH] Disable unsupported tests
|
5 | 5 |
|
6 | 6 | ---
|
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(-) |
| 7 | + crates/core_simd/src/math.rs | 6 ++++++ |
| 8 | + crates/core_simd/src/vector.rs | 2 ++ |
| 9 | + crates/core_simd/tests/masks.rs | 2 ++ |
| 10 | + crates/core_simd/tests/ops_macros.rs | 4 ++++ |
| 11 | + 4 files changed, 14 insertions(+) |
13 | 12 |
|
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 |
19 |
| - self.0 |
20 |
| - } |
21 |
| - |
22 |
| -+ /* |
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. |
25 |
| - /// ``` |
26 |
| -@@ -150,6 +151,7 @@ where |
27 |
| - // Cleared ☢️ *mut T Zone |
28 |
| - } |
29 |
| - } |
30 |
| -+ */ |
31 |
| - } |
32 |
| - |
33 |
| - impl<T, const LANES: usize> Copy for Simd<T, LANES> |
34 | 13 | diff --git a/crates/core_simd/src/math.rs b/crates/core_simd/src/math.rs
|
35 |
| -index 7290a28..e394730 100644 |
| 14 | +index 2bae414..2f87499 100644 |
36 | 15 | --- a/crates/core_simd/src/math.rs
|
37 | 16 | +++ b/crates/core_simd/src/math.rs
|
38 |
| -@@ -2,6 +2,7 @@ macro_rules! impl_uint_arith { |
| 17 | +@@ -5,6 +5,7 @@ macro_rules! impl_uint_arith { |
39 | 18 | ($($ty:ty),+) => {
|
40 | 19 | $( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
|
41 | 20 |
|
42 | 21 | + /*
|
43 | 22 | /// Lanewise saturating add.
|
44 | 23 | ///
|
45 | 24 | /// # Examples
|
46 |
| -@@ -38,6 +39,7 @@ macro_rules! impl_uint_arith { |
| 25 | +@@ -43,6 +44,7 @@ macro_rules! impl_uint_arith { |
47 | 26 | pub fn saturating_sub(self, second: Self) -> Self {
|
48 |
| - unsafe { crate::intrinsics::simd_saturating_sub(self, second) } |
| 27 | + unsafe { simd_saturating_sub(self, second) } |
49 | 28 | }
|
50 | 29 | + */
|
51 | 30 | })+
|
52 | 31 | }
|
53 | 32 | }
|
54 |
| -@@ -46,6 +48,7 @@ macro_rules! impl_int_arith { |
| 33 | +@@ -51,6 +53,7 @@ macro_rules! impl_int_arith { |
55 | 34 | ($($ty:ty),+) => {
|
56 | 35 | $( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
|
57 | 36 |
|
58 | 37 | + /*
|
59 | 38 | /// Lanewise saturating add.
|
60 | 39 | ///
|
61 | 40 | /// # Examples
|
62 |
| -@@ -141,6 +144,7 @@ macro_rules! impl_int_arith { |
| 41 | +@@ -89,6 +92,7 @@ macro_rules! impl_int_arith { |
| 42 | + pub fn saturating_sub(self, second: Self) -> Self { |
| 43 | + unsafe { simd_saturating_sub(self, second) } |
| 44 | + } |
| 45 | ++ */ |
| 46 | + |
| 47 | + /// Lanewise absolute value, implemented in Rust. |
| 48 | + /// Every lane becomes its absolute value. |
| 49 | +@@ -109,6 +113,7 @@ macro_rules! impl_int_arith { |
| 50 | + (self^m) - m |
| 51 | + } |
| 52 | + |
| 53 | ++ /* |
| 54 | + /// Lanewise saturating absolute value, implemented in Rust. |
| 55 | + /// As abs(), except the MIN value becomes MAX instead of itself. |
| 56 | + /// |
| 57 | +@@ -151,6 +156,7 @@ macro_rules! impl_int_arith { |
63 | 58 | pub fn saturating_neg(self) -> Self {
|
64 | 59 | Self::splat(0).saturating_sub(self)
|
65 | 60 | }
|
66 | 61 | + */
|
67 | 62 | })+
|
68 | 63 | }
|
69 | 64 | }
|
| 65 | +diff --git a/crates/core_simd/src/vector.rs b/crates/core_simd/src/vector.rs |
| 66 | +index 7c5ec2b..c8631e8 100644 |
| 67 | +--- a/crates/core_simd/src/vector.rs |
| 68 | ++++ b/crates/core_simd/src/vector.rs |
| 69 | +@@ -75,6 +75,7 @@ where |
| 70 | + Self(array) |
| 71 | + } |
| 72 | + |
| 73 | ++ /* |
| 74 | + /// Reads from potentially discontiguous indices in `slice` to construct a SIMD vector. |
| 75 | + /// If an index is out-of-bounds, the lane is instead selected from the `or` vector. |
| 76 | + /// |
| 77 | +@@ -297,6 +298,7 @@ where |
| 78 | + // Cleared ☢️ *mut T Zone |
| 79 | + } |
| 80 | + } |
| 81 | ++ */ |
| 82 | + } |
| 83 | + |
| 84 | + impl<T, const LANES: usize> Copy for Simd<T, LANES> |
70 | 85 | diff --git a/crates/core_simd/tests/masks.rs b/crates/core_simd/tests/masks.rs
|
71 |
| -index 61d8e44..2bccae2 100644 |
| 86 | +index 6a8ecd3..68fcb49 100644 |
72 | 87 | --- a/crates/core_simd/tests/masks.rs
|
73 | 88 | +++ b/crates/core_simd/tests/masks.rs
|
74 |
| -@@ -67,19 +67,6 @@ macro_rules! test_mask_api { |
75 |
| - assert_eq!(int.to_array(), [-1, 0, 0, -1, 0, 0, -1, 0]); |
| 89 | +@@ -68,6 +68,7 @@ macro_rules! test_mask_api { |
76 | 90 | assert_eq!(core_simd::Mask::<$type, 8>::from_int(int), mask);
|
77 | 91 | }
|
78 |
| -- |
79 |
| -- #[cfg(feature = "generic_const_exprs")] |
80 |
| -- #[test] |
81 |
| -- fn roundtrip_bitmask_conversion() { |
82 |
| -- let values = [ |
83 |
| -- true, false, false, true, false, false, true, false, |
84 |
| -- true, true, false, false, false, false, false, true, |
85 |
| -- ]; |
86 |
| -- let mask = core_simd::Mask::<$type, 16>::from_array(values); |
87 |
| -- let bitmask = mask.to_bitmask(); |
88 |
| -- assert_eq!(bitmask, [0b01001001, 0b10000011]); |
89 |
| -- assert_eq!(core_simd::Mask::<$type, 16>::from_bitmask(bitmask), mask); |
90 |
| -- } |
| 92 | + |
| 93 | ++ /* |
| 94 | + #[cfg(feature = "generic_const_exprs")] |
| 95 | + #[test] |
| 96 | + fn roundtrip_bitmask_conversion() { |
| 97 | +@@ -80,6 +81,7 @@ macro_rules! test_mask_api { |
| 98 | + assert_eq!(bitmask, [0b01001001, 0b10000011]); |
| 99 | + assert_eq!(core_simd::Mask::<$type, 16>::from_bitmask(bitmask), mask); |
| 100 | + } |
| 101 | ++ */ |
91 | 102 | }
|
92 | 103 | }
|
93 | 104 | }
|
94 | 105 | diff --git a/crates/core_simd/tests/ops_macros.rs b/crates/core_simd/tests/ops_macros.rs
|
95 |
| -index cb39e73..fc0ebe1 100644 |
| 106 | +index 31b7ee2..bd04b3c 100644 |
96 | 107 | --- a/crates/core_simd/tests/ops_macros.rs
|
97 | 108 | +++ b/crates/core_simd/tests/ops_macros.rs
|
98 |
| -@@ -435,6 +435,7 @@ macro_rules! impl_float_tests { |
99 |
| - ) |
100 |
| - } |
101 |
| - |
102 |
| -+ /* |
103 |
| - fn mul_add<const LANES: usize>() { |
104 |
| - test_helpers::test_ternary_elementwise( |
105 |
| - &Vector::<LANES>::mul_add, |
106 |
| -@@ -442,6 +443,7 @@ macro_rules! impl_float_tests { |
107 |
| - &|_, _, _| true, |
108 |
| - ) |
109 |
| - } |
110 |
| -+ */ |
111 |
| - |
112 |
| - fn recip<const LANES: usize>() { |
113 |
| - test_helpers::test_unary_elementwise( |
114 |
| -@@ -581,6 +585,7 @@ macro_rules! impl_float_tests { |
| 109 | +@@ -567,6 +567,7 @@ macro_rules! impl_float_tests { |
115 | 110 | });
|
116 | 111 | }
|
117 | 112 |
|
118 | 113 | + /*
|
119 | 114 | fn horizontal_max<const LANES: usize>() {
|
120 | 115 | test_helpers::test_1(&|x| {
|
121 | 116 | let vmax = Vector::<LANES>::from_array(x).horizontal_max();
|
122 |
| -@@ -604,6 +609,7 @@ macro_rules! impl_float_tests { |
| 117 | +@@ -590,6 +591,7 @@ macro_rules! impl_float_tests { |
123 | 118 | Ok(())
|
124 | 119 | });
|
125 | 120 | }
|
126 | 121 | + */
|
127 | 122 | }
|
128 | 123 |
|
129 | 124 | #[cfg(feature = "std")]
|
130 |
| -diff --git a/crates/core_simd/tests/round.rs b/crates/core_simd/tests/round.rs |
131 |
| -index 37044a7..4cdc6b7 100644 |
132 |
| ---- a/crates/core_simd/tests/round.rs |
133 |
| -+++ b/crates/core_simd/tests/round.rs |
134 |
| -@@ -25,6 +25,7 @@ macro_rules! float_rounding_test { |
135 |
| - ) |
136 |
| - } |
| 125 | +@@ -604,6 +606,7 @@ macro_rules! impl_float_tests { |
| 126 | + ) |
| 127 | + } |
137 | 128 |
|
138 |
| -+ /* |
139 |
| - fn round<const LANES: usize>() { |
140 |
| - test_helpers::test_unary_elementwise( |
141 |
| - &Vector::<LANES>::round, |
142 |
| -@@ -32,6 +33,7 @@ macro_rules! float_rounding_test { |
143 |
| - &|_| true, |
144 |
| - ) |
| 129 | ++ /* |
| 130 | + fn mul_add<const LANES: usize>() { |
| 131 | + test_helpers::test_ternary_elementwise( |
| 132 | + &Vector::<LANES>::mul_add, |
| 133 | +@@ -611,6 +614,7 @@ macro_rules! impl_float_tests { |
| 134 | + &|_, _, _| true, |
| 135 | + ) |
| 136 | + } |
| 137 | ++ */ |
145 | 138 | }
|
146 |
| -+ */ |
147 |
| - |
148 |
| - fn trunc<const LANES: usize>() { |
149 |
| - test_helpers::test_unary_elementwise( |
| 139 | + } |
| 140 | + } |
150 | 141 | --
|
151 | 142 | 2.26.2.7.g19db9cfb68
|
152 | 143 |
|
0 commit comments