@@ -4,21 +4,20 @@ Date: Sun, 25 Jul 2021 18:39:31 +0200
44Subject: [PATCH] Disable unsupported tests
55
66---
7- crates/core_simd/src/array.rs | 2 ++
8- crates/core_simd/src/lib.rs | 2 +-
7+ crates/core_simd/src/vector.rs | 2 ++
98 crates/core_simd/src/math.rs | 4 ++++
109 crates/core_simd/tests/masks.rs | 12 ------------
1110 crates/core_simd/tests/ops_macros.rs | 6 ++++++
1211 crates/core_simd/tests/round.rs | 2 ++
1312 6 files changed, 15 insertions(+), 13 deletions(-)
1413
15- diff --git a/crates/core_simd/src/array .rs b/crates/core_simd/src/array .rs
14+ diff --git a/crates/core_simd/src/vector .rs b/crates/core_simd/src/vector .rs
1615index 25c5309..2b3d819 100644
17- --- a/crates/core_simd/src/array .rs
18- +++ b/crates/core_simd/src/array .rs
16+ --- a/crates/core_simd/src/vector .rs
17+ +++ b/crates/core_simd/src/vector .rs
1918@@ -22,6 +22,7 @@ where
20- #[must_use]
21- fn splat(val: Self::Scalar) -> Self;
19+ self.0
20+ }
2221
2322+ /*
2423 /// SIMD gather: construct a SIMD vector by reading from a slice, using potentially discontiguous indices.
@@ -31,27 +30,14 @@ index 25c5309..2b3d819 100644
3130+ */
3231 }
3332
34- macro_rules! impl_simdarray_for {
35- diff --git a/crates/core_simd/src/lib.rs b/crates/core_simd/src/lib.rs
36- index a64904d..299eb11 100644
37- --- a/crates/core_simd/src/lib.rs
38- +++ b/crates/core_simd/src/lib.rs
39- @@ -1,7 +1,7 @@
40- #![no_std]
41- #![allow(incomplete_features)]
42- #![feature(
43- - const_generics,
44- + const_generics,
45- platform_intrinsics,
46- repr_simd,
47- simd_ffi,
33+ impl<T, const LANES: usize> Copy for Simd<T, LANES>
4834diff --git a/crates/core_simd/src/math.rs b/crates/core_simd/src/math.rs
4935index 7290a28..e394730 100644
5036--- a/crates/core_simd/src/math.rs
5137+++ b/crates/core_simd/src/math.rs
5238@@ -2,6 +2,7 @@ macro_rules! impl_uint_arith {
53- ($(($name:ident, $n:ident) ),+) => {
54- $( impl<const LANES: usize> $name< LANES> where Self: crate::LanesAtMost32 {
39+ ($($ty:ty ),+) => {
40+ $( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
5541
5642+ /*
5743 /// Lanewise saturating add.
@@ -66,8 +52,8 @@ index 7290a28..e394730 100644
6652 }
6753 }
6854@@ -46,6 +48,7 @@ macro_rules! impl_int_arith {
69- ($(($name:ident, $n:ident) ),+) => {
70- $( impl<const LANES: usize> $name< LANES> where Self: crate::LanesAtMost32 {
55+ ($($ty:ty ),+) => {
56+ $( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
7157
7258+ /*
7359 /// Lanewise saturating add.
@@ -85,21 +71,22 @@ diff --git a/crates/core_simd/tests/masks.rs b/crates/core_simd/tests/masks.rs
8571index 61d8e44..2bccae2 100644
8672--- a/crates/core_simd/tests/masks.rs
8773+++ b/crates/core_simd/tests/masks.rs
88- @@ -67,18 +67,6 @@ macro_rules! test_mask_api {
74+ @@ -67,19 +67,6 @@ macro_rules! test_mask_api {
8975 assert_eq!(int.to_array(), [-1, 0, 0, -1, 0, 0, -1, 0]);
90- assert_eq!(core_simd::$name ::<8>::from_int(int), mask);
76+ assert_eq!(core_simd::Mask ::<$type, 8>::from_int(int), mask);
9177 }
9278-
79+ - #[cfg(feature = "generic_const_exprs")]
9380- #[test]
9481- fn roundtrip_bitmask_conversion() {
9582- let values = [
9683- true, false, false, true, false, false, true, false,
9784- true, true, false, false, false, false, false, true,
9885- ];
99- - let mask = core_simd::$name ::<16>::from_array(values);
86+ - let mask = core_simd::Mask ::<$type, 16>::from_array(values);
10087- let bitmask = mask.to_bitmask();
10188- assert_eq!(bitmask, [0b01001001, 0b10000011]);
102- - assert_eq!(core_simd::$name ::<16>::from_bitmask(bitmask), mask);
89+ - assert_eq!(core_simd::Mask ::<$type, 16>::from_bitmask(bitmask), mask);
10390- }
10491 }
10592 }
@@ -122,7 +109,7 @@ index cb39e73..fc0ebe1 100644
122109 }
123110+ */
124111
125- fn sqrt <const LANES: usize>() {
112+ fn recip <const LANES: usize>() {
126113 test_helpers::test_unary_elementwise(
127114@@ -581,6 +585,7 @@ macro_rules! impl_float_tests {
128115 });
@@ -138,8 +125,8 @@ index cb39e73..fc0ebe1 100644
138125 }
139126+ */
140127 }
141- }
142- }
128+
129+ #[cfg(feature = "std")]
143130diff --git a/crates/core_simd/tests/round.rs b/crates/core_simd/tests/round.rs
144131index 37044a7..4cdc6b7 100644
145132--- a/crates/core_simd/tests/round.rs
0 commit comments