Package list rust-stfu8 / 4ec1ab9
packed-simd - remove mentions of FIXME from patches to keep debian cargo tooling happy. Peter Michael Green 8 months ago
5 changed file(s) with 101 addition(s) and 394 deletion(s). Raw diff Collapse all Expand all
00 This patch is based on the upstream commit described below, with changes
1 to files not present in the Debian package removed.
1 to files not present in the Debian package removed and to remove mentions
2 of F-I-X-M-E (remove dashes) which upsets the Debian cargo tools.
23
34 commit acd3aef63607d8c1b256943f9f53e7bfb7680352
45 Author: gnzlbg <gonzalobg88@gmail.com>
2728 index 7e2782f0f..1712a0de5 100644
2829 --- a/src/api/cmp/partial_eq.rs
2930 +++ b/src/api/cmp/partial_eq.rs
30 @@ -7,7 +7,7 @@ macro_rules! impl_cmp_partial_eq {
31 ($true:expr, $false:expr)
32 ) => {
33 // FIXME: https://github.com/rust-lang-nursery/rust-clippy/issues/2892
34 - #[cfg_attr(feature = "cargo-clippy", allow(clippy::partialeq_ne_impl))]
35 + #[allow(clippy::partialeq_ne_impl)]
36 impl crate::cmp::PartialEq<$id> for $id {
37 #[inline]
38 fn eq(&self, other: &Self) -> bool {
39 @@ -20,7 +20,7 @@ macro_rules! impl_cmp_partial_eq {
40 }
41
42 // FIXME: https://github.com/rust-lang-nursery/rust-clippy/issues/2892
43 - #[cfg_attr(feature = "cargo-clippy", allow(clippy::partialeq_ne_impl))]
44 + #[allow(clippy::partialeq_ne_impl)]
45 impl crate::cmp::PartialEq<LexicographicallyOrdered<$id>>
46 for LexicographicallyOrdered<$id>
47 {
4831 @@ -34,12 +34,13 @@ macro_rules! impl_cmp_partial_eq {
4932 }
5033 }
317300 impl<T> crate::cmp::PartialEq<$id<T>> for $id<T> {
318301 #[inline]
319302 fn eq(&self, other: &Self) -> bool {
320 @@ -437,7 +434,7 @@ macro_rules! impl_minimal_p {
321 }
322
323 // FIXME: https://github.com/rust-lang-nursery/rust-clippy/issues/2892
324 - #[cfg_attr(feature = "cargo-clippy", allow(clippy::partialeq_ne_impl))]
325 + #[allow(clippy::partialeq_ne_impl)]
326 impl<T> crate::cmp::PartialEq<LexicographicallyOrdered<$id<T>>>
327 for LexicographicallyOrdered<$id<T>>
328 {
329303 @@ -621,8 +618,7 @@ macro_rules! impl_minimal_p {
330304 #[inline]
331305 pub unsafe fn from_slice_aligned_unchecked(slice: &[$elem_ty])
+0
-227
src/packed-simd/debian/patches/let-packed-simd-be-sloppy.diff less more
0 commit 76916f1a8518540b90063832ace546d5efdb13ca
1 Author: Jubilee Young <workingjubilee@gmail.com>
2 Date: Sat May 15 20:39:43 2021 -0700
3
4 Let packed_simd to be sloppy
5
6 diff --git a/.travis.yml b/.travis.yml
7 index 011eddde0..0ffc06afd 100644
8 --- a/.travis.yml
9 +++ b/.travis.yml
10 @@ -173,12 +173,6 @@ jobs:
11 rustup toolchain install nightly -c rustfmt --allow-downgrade
12 ci/all.sh check_fmt || true
13 stage: tools
14 - - name: "clippy"
15 - install: true
16 - script: |
17 - rustup component add clippy
18 - ci/all.sh clippy
19 - stage: tools
20
21 allow_failures:
22 # FIXME: ISPC cannot be found?
23 diff --git a/examples/Cargo.toml b/examples/Cargo.toml
24 index 681326351..b05d4b22b 100644
25 --- a/examples/Cargo.toml
26 +++ b/examples/Cargo.toml
27 @@ -1,3 +1,6 @@
28 +# FIXME: Many members of this workspace, including aobench, mandelbrot, and stencil,
29 +# currently trigger a "null pointer deref" warning.
30 +# This is likely due to unsoundness inside packed_simd.
31 [workspace]
32 members = [
33 "aobench",
34 diff --git a/examples/aobench/src/lib.rs b/examples/aobench/src/lib.rs
35 index 7fc7f9bda..d6bbb4cf5 100644
36 --- a/examples/aobench/src/lib.rs
37 +++ b/examples/aobench/src/lib.rs
38 @@ -2,7 +2,9 @@
39 //!
40 //! Based on [aobench](https://code.google.com/archive/p/aobench/) by Syoyo
41 //! Fujita.
42 -#![deny(warnings, rust_2018_idioms)]
43 +// FIXME: Null pointer deref warning triggered in this example,
44 +// likely inside a macro expansion deriving from packed_simd.
45 +#![deny(rust_2018_idioms)]
46 #![allow(non_snake_case, non_camel_case_types)]
47 #![allow(
48 clippy::many_single_char_names,
49 diff --git a/examples/aobench/src/main.rs b/examples/aobench/src/main.rs
50 index 3dd5ec88b..9dbb1f467 100644
51 --- a/examples/aobench/src/main.rs
52 +++ b/examples/aobench/src/main.rs
53 @@ -2,7 +2,7 @@
54 //!
55 //! Based on [aobench](https://code.google.com/archive/p/aobench/) by Syoyo
56 //! Fujita.
57 -#![deny(warnings, rust_2018_idioms)]
58 +#![deny(rust_2018_idioms)]
59
60 use aobench_lib::*;
61 use std::path::PathBuf;
62 diff --git a/examples/dot_product/src/lib.rs b/examples/dot_product/src/lib.rs
63 index 7f053a8f3..77d170c0d 100644
64 --- a/examples/dot_product/src/lib.rs
65 +++ b/examples/dot_product/src/lib.rs
66 @@ -1,5 +1,5 @@
67 //! Vector dot product
68 -#![deny(warnings, rust_2018_idioms)]
69 +#![deny(rust_2018_idioms)]
70 #![feature(custom_inner_attributes)]
71 #![allow(clippy::must_use_candidate, clippy::float_cmp)]
72
73 diff --git a/examples/fannkuch_redux/src/main.rs b/examples/fannkuch_redux/src/main.rs
74 index 912b4d66b..24cdec49f 100644
75 --- a/examples/fannkuch_redux/src/main.rs
76 +++ b/examples/fannkuch_redux/src/main.rs
77 @@ -1,4 +1,4 @@
78 -#![deny(warnings, rust_2018_idioms)]
79 +#![deny(rust_2018_idioms)]
80
81 use fannkuch_redux_lib::*;
82
83 diff --git a/examples/mandelbrot/src/lib.rs b/examples/mandelbrot/src/lib.rs
84 index 581fd02ca..196edc8b0 100644
85 --- a/examples/mandelbrot/src/lib.rs
86 +++ b/examples/mandelbrot/src/lib.rs
87 @@ -2,7 +2,9 @@
88 //!
89 //! [bg]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/mandelbrot.html#mandelbrot
90
91 -#![deny(warnings, rust_2018_idioms)]
92 +// FIXME: Null pointer deref warning triggered in this example,
93 +// likely inside a macro expansion deriving from packed_simd.
94 +#![deny(rust_2018_idioms)]
95 #![allow(
96 clippy::cast_precision_loss,
97 clippy::cast_sign_loss,
98 diff --git a/examples/mandelbrot/src/main.rs b/examples/mandelbrot/src/main.rs
99 index 6f82f05ac..7bee4a2f7 100644
100 --- a/examples/mandelbrot/src/main.rs
101 +++ b/examples/mandelbrot/src/main.rs
102 @@ -2,7 +2,7 @@
103 //!
104 //! [bg]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/mandelbrot.html#mandelbrot
105
106 -#![deny(warnings, rust_2018_idioms)]
107 +#![deny(rust_2018_idioms)]
108
109 use mandelbrot_lib::*;
110 use std::io;
111 diff --git a/examples/matrix_inverse/src/lib.rs b/examples/matrix_inverse/src/lib.rs
112 index 1f9bab3f8..fc3dbe210 100644
113 --- a/examples/matrix_inverse/src/lib.rs
114 +++ b/examples/matrix_inverse/src/lib.rs
115 @@ -1,6 +1,6 @@
116 //! 4x4 matrix inverse
117 #![feature(custom_inner_attributes)]
118 -#![deny(warnings, rust_2018_idioms)]
119 +#![deny(rust_2018_idioms)]
120 #![allow(clippy::must_use_candidate)]
121
122 pub mod scalar;
123 diff --git a/examples/nbody/src/lib.rs b/examples/nbody/src/lib.rs
124 index d15854d5d..87c08b79c 100644
125 --- a/examples/nbody/src/lib.rs
126 +++ b/examples/nbody/src/lib.rs
127 @@ -1,7 +1,7 @@
128 //! The N-body benchmark from the [benchmarks game][bg].
129 //!
130 //! [bg]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/nbody.html#nbody
131 -#![deny(warnings, rust_2018_idioms)]
132 +#![deny(rust_2018_idioms)]
133 #![allow(
134 clippy::similar_names,
135 clippy::excessive_precision,
136 diff --git a/examples/nbody/src/main.rs b/examples/nbody/src/main.rs
137 index 3f53b2fe5..c5bc128eb 100644
138 --- a/examples/nbody/src/main.rs
139 +++ b/examples/nbody/src/main.rs
140 @@ -1,7 +1,7 @@
141 //! The N-body benchmark from the [benchmarks game][bg].
142 //!
143 //! [bg]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/nbody.html#nbody
144 -#![deny(warnings, rust_2018_idioms)]
145 +#![deny(rust_2018_idioms)]
146
147 fn run<O: std::io::Write>(o: &mut O, n: usize, alg: usize) {
148 let (energy_before, energy_after) = nbody_lib::run(n, alg);
149 diff --git a/examples/options_pricing/src/lib.rs b/examples/options_pricing/src/lib.rs
150 index 138249909..86f5f0248 100644
151 --- a/examples/options_pricing/src/lib.rs
152 +++ b/examples/options_pricing/src/lib.rs
153 @@ -1,4 +1,4 @@
154 -#![deny(warnings, rust_2018_idioms)]
155 +#![deny(rust_2018_idioms)]
156 #![allow(
157 clippy::inline_always,
158 clippy::many_single_char_names,
159 diff --git a/examples/slice_sum/src/main.rs b/examples/slice_sum/src/main.rs
160 index 18b3692aa..2b3e440ad 100644
161 --- a/examples/slice_sum/src/main.rs
162 +++ b/examples/slice_sum/src/main.rs
163 @@ -1,4 +1,4 @@
164 -#![deny(warnings, rust_2018_idioms)]
165 +#![deny(rust_2018_idioms)]
166
167 use packed_simd::f32x8 as f32s;
168 use std::{mem, slice};
169 diff --git a/examples/spectral_norm/src/lib.rs b/examples/spectral_norm/src/lib.rs
170 index 1134fb0b6..dac35341d 100644
171 --- a/examples/spectral_norm/src/lib.rs
172 +++ b/examples/spectral_norm/src/lib.rs
173 @@ -1,5 +1,5 @@
174 //! Spectral Norm
175 -#![deny(warnings, rust_2018_idioms)]
176 +#![deny(rust_2018_idioms)]
177 #![allow(non_snake_case, non_camel_case_types)]
178 #![allow(
179 clippy::cast_precision_loss,
180 diff --git a/examples/spectral_norm/src/main.rs b/examples/spectral_norm/src/main.rs
181 index d16e6de99..7bbdf7cbf 100644
182 --- a/examples/spectral_norm/src/main.rs
183 +++ b/examples/spectral_norm/src/main.rs
184 @@ -1,5 +1,3 @@
185 -#![deny(warnings)]
186 -
187 extern crate spectral_norm_lib;
188 use spectral_norm_lib::*;
189
190 diff --git a/examples/stencil/src/lib.rs b/examples/stencil/src/lib.rs
191 index b922bc14f..1d7aeb40d 100644
192 --- a/examples/stencil/src/lib.rs
193 +++ b/examples/stencil/src/lib.rs
194 @@ -1,5 +1,7 @@
195 #![feature(custom_inner_attributes, stmt_expr_attributes)]
196 -#![deny(warnings, rust_2018_idioms)]
197 +// FIXME: Null pointer deref warning triggered in this example,
198 +// likely inside a macro expansion deriving from packed_simd.
199 +#![deny(rust_2018_idioms)]
200 #![allow(
201 clippy::similar_names,
202 clippy::cast_precision_loss,
203 diff --git a/micro_benchmarks/benches/mask_reductions.rs b/micro_benchmarks/benches/mask_reductions.rs
204 index e0b43a993..7d7ade52b 100644
205 --- a/micro_benchmarks/benches/mask_reductions.rs
206 +++ b/micro_benchmarks/benches/mask_reductions.rs
207 @@ -1,5 +1,5 @@
208 //! Benchmarks for the mask reductions `all`, `any`, and `none`.
209 -#![deny(warnings, rust_2018_idioms)]
210 +#![deny(rust_2018_idioms)]
211 #![feature(test)]
212
213 use packed_simd::*;
214 diff --git a/verify/verify/src/lib.rs b/verify/verify/src/lib.rs
215 index ad87e56cd..b222c88f1 100644
216 --- a/verify/verify/src/lib.rs
217 +++ b/verify/verify/src/lib.rs
218 @@ -1,7 +1,7 @@
219 // FIXME: these types are unsound in C FFI already
220 // See https://github.com/rust-lang/rust/issues/53346
221 #![allow(improper_ctypes_definitions)]
222 -#![deny(warnings, rust_2018_idioms)]
223 +#![deny(rust_2018_idioms)]
224 #![cfg_attr(test, feature(avx512_target_feature, abi_vectorcall, llvm_asm))]
225
226 #[cfg(test)]
99 index 6ee30c590..93c6ce6b7 100644
1010 --- a/src/codegen/llvm.rs
1111 +++ b/src/codegen/llvm.rs
12 @@ -10,31 +10,37 @@ extern "platform-intrinsic" {
13 // FIXME: Passing this intrinsics an `idx` array with an index that is
12 @@ -11,29 +10,35 @@ extern "platform-intrinsic" {
1413 // out-of-bounds will produce a monomorphization-time error.
1514 // https://github.com/rust-lang-nursery/packed_simd/issues/21
1615 + #[rustc_args_required_const(2)]
4645 + #[rustc_args_required_const(2)]
4746 pub fn simd_shuffle64<T, U>(x: T, y: T, idx: [u32; 64]) -> U
4847 where
49 T: Simd,
4242 - // See https://github.com/rust-lang/rust-clippy/issues/3410
4343 - clippy::use_self,
4444 - clippy::wrong_self_convention
45 + // FIXME: these types are unsound in C FFI already
45 + // these types are unsound in C FFI already
4646 + // See https://github.com/rust-lang/rust/issues/53346
4747 + improper_ctypes_definitions,
4848 + clippy::cast_possible_truncation,
00 This patch is based on the upstream commit described below, adjusted to
1 remove fuzz when applying to the Debian package.
1 remove fuzz when applying to the Debian package and to avoid mentioning
2 F-I-X-M-E (remove the dashes) in the patch which upsets the debcargo
3 scripts.
24
35 commit 728d47506fe3a2599818060bd6e02e4bd3e338d5
46 Author: Jubilee Young <workingjubilee@gmail.com>
68
79 Update shuffle API for const generics
810
9 Index: rust-packed-simd-0.3.3/src/api/shuffle.rs
10 ===================================================================
11 --- rust-packed-simd-0.3.3.orig/src/api/shuffle.rs
12 +++ rust-packed-simd-0.3.3/src/api/shuffle.rs
13 @@ -79,20 +79,18 @@ macro_rules! shuffle {
14 ($vec0:expr, $vec1:expr, [$l0:expr, $l1:expr]) => {{
15 #[allow(unused_unsafe)]
11 only in patch2:
12 --- packed-simd.orig/src/api/shuffle.rs
13 +++ packed-simd/src/api/shuffle.rs
14 @@ -81,6 +81,5 @@
1615 unsafe {
1716 - $crate::Simd($crate::__shuffle_vector2(
1817 + $crate::Simd($crate::__shuffle_vector2::<{[$l0, $l1]}, _, _>(
2019 $vec1.0,
2120 - [$l0, $l1],
2221 ))
23 }
24 }};
25 ($vec0:expr, $vec1:expr, [$l0:expr, $l1:expr, $l2:expr, $l3:expr]) => {{
26 #[allow(unused_unsafe)]
22 @@ -91,6 +90,5 @@
2723 unsafe {
2824 - $crate::Simd($crate::__shuffle_vector4(
2925 + $crate::Simd($crate::__shuffle_vector4::<{[$l0, $l1, $l2, $l3]}, _, _>(
3127 $vec1.0,
3228 - [$l0, $l1, $l2, $l3],
3329 ))
34 }
35 }};
36 @@ -101,10 +99,9 @@ macro_rules! shuffle {
37 $l4:expr, $l5:expr, $l6:expr, $l7:expr]) => {{
38 #[allow(unused_unsafe)]
30 @@ -103,6 +101,5 @@
3931 unsafe {
4032 - $crate::Simd($crate::__shuffle_vector8(
4133 + $crate::Simd($crate::__shuffle_vector8::<{[$l0, $l1, $l2, $l3, $l4, $l5, $l6, $l7]}, _, _>(
4335 $vec1.0,
4436 - [$l0, $l1, $l2, $l3, $l4, $l5, $l6, $l7],
4537 ))
46 }
47 }};
48 @@ -115,13 +112,14 @@ macro_rules! shuffle {
49 $l12:expr, $l13:expr, $l14:expr, $l15:expr]) => {{
50 #[allow(unused_unsafe)]
38 @@ -117,5 +114,3 @@
5139 unsafe {
5240 - $crate::Simd($crate::__shuffle_vector16(
5341 - $vec0.0,
5442 - $vec1.0,
5543 + $crate::Simd($crate::__shuffle_vector16::<{
5644 [
57 $l0, $l1, $l2, $l3, $l4, $l5, $l6, $l7, $l8, $l9, $l10,
45 @@ -123,3 +118,6 @@
5846 $l11, $l12, $l13, $l14, $l15,
5947 - ],
6048 + ]
6250 + $vec0.0,
6351 + $vec1.0,
6452 ))
65 }
66 }};
67 @@ -136,15 +134,16 @@ macro_rules! shuffle {
68 $l28:expr, $l29:expr, $l30:expr, $l31:expr]) => {{
69 #[allow(unused_unsafe)]
53 @@ -138,5 +136,3 @@
7054 unsafe {
7155 - $crate::Simd($crate::__shuffle_vector32(
7256 - $vec0.0,
7357 - $vec1.0,
7458 + $crate::Simd($crate::__shuffle_vector32::<{
7559 [
76 $l0, $l1, $l2, $l3, $l4, $l5, $l6, $l7, $l8, $l9, $l10,
77 $l11, $l12, $l13, $l14, $l15, $l16, $l17, $l18, $l19,
78 $l20, $l21, $l22, $l23, $l24, $l25, $l26, $l27, $l28,
60 @@ -146,3 +142,6 @@
7961 $l29, $l30, $l31,
8062 - ],
8163 + ]
8365 + $vec0.0,
8466 + $vec1.0,
8567 ))
86 }
87 }};
88 @@ -167,18 +166,17 @@ macro_rules! shuffle {
89 $l60:expr, $l61:expr, $l62:expr, $l63:expr]) => {{
90 #[allow(unused_unsafe)]
68 @@ -169,14 +168,13 @@
9169 unsafe {
9270 - $crate::Simd($crate::__shuffle_vector64(
9371 + $crate::Simd($crate::__shuffle_vector64::<{[
11189 - $l56, $l57, $l58, $l59, $l60, $l61, $l62, $l63,
11290 - ],
11391 ))
114 }
115 }};
116 Index: rust-packed-simd-0.3.3/src/codegen/llvm.rs
117 ===================================================================
118 --- rust-packed-simd-0.3.3.orig/src/codegen/llvm.rs
119 +++ rust-packed-simd-0.3.3/src/codegen/llvm.rs
120 @@ -7,52 +7,73 @@ use crate::sealed::Simd;
121
92 only in patch2:
93 --- packed-simd.orig/src/codegen/llvm.rs
94 +++ packed-simd/src/codegen/llvm.rs
95 @@ -8,2 +8,71 @@
12296 // Shuffle intrinsics: expanded in users' crates, therefore public.
97 +extern "platform-intrinsic" {
98 + pub fn simd_shuffle2<T, U>(x: T, y: T, idx: [u32; 2]) -> U;
99 + pub fn simd_shuffle4<T, U>(x: T, y: T, idx: [u32; 4]) -> U;
100 + pub fn simd_shuffle8<T, U>(x: T, y: T, idx: [u32; 8]) -> U;
101 + pub fn simd_shuffle16<T, U>(x: T, y: T, idx: [u32; 16]) -> U;
102 + pub fn simd_shuffle32<T, U>(x: T, y: T, idx: [u32; 32]) -> U;
103 + pub fn simd_shuffle64<T, U>(x: T, y: T, idx: [u32; 64]) -> U;
104 +}
105 +
106 +#[allow(clippy::missing_safety_doc)]
107 +#[inline]
108 +pub unsafe fn __shuffle_vector2<const IDX: [u32; 2], T, U>(x: T, y: T) -> U
109 +where
110 + T: Simd,
111 + <T as Simd>::Element: Shuffle<[u32; 2], Output = U>,
112 +{
113 + simd_shuffle2(x, y, IDX)
114 +}
115 +
116 +#[allow(clippy::missing_safety_doc)]
117 +#[inline]
118 +pub unsafe fn __shuffle_vector4<const IDX: [u32; 4], T, U>(x: T, y: T) -> U
119 +where
120 + T: Simd,
121 + <T as Simd>::Element: Shuffle<[u32; 4], Output = U>,
122 +{
123 + simd_shuffle4(x, y, IDX)
124 +}
125 +
126 +#[allow(clippy::missing_safety_doc)]
127 +#[inline]
128 +pub unsafe fn __shuffle_vector8<const IDX: [u32; 8], T, U>(x: T, y: T) -> U
129 +where
130 + T: Simd,
131 + <T as Simd>::Element: Shuffle<[u32; 8], Output = U>,
132 +{
133 + simd_shuffle8(x, y, IDX)
134 +}
135 +
136 +#[allow(clippy::missing_safety_doc)]
137 +#[inline]
138 +pub unsafe fn __shuffle_vector16<const IDX: [u32; 16], T, U>(x: T, y: T) -> U
139 +where
140 + T: Simd,
141 + <T as Simd>::Element: Shuffle<[u32; 16], Output = U>,
142 +{
143 + simd_shuffle16(x, y, IDX)
144 +}
145 +
146 +#[allow(clippy::missing_safety_doc)]
147 +#[inline]
148 +pub unsafe fn __shuffle_vector32<const IDX: [u32; 32], T, U>(x: T, y: T) -> U
149 +where
150 + T: Simd,
151 + <T as Simd>::Element: Shuffle<[u32; 32], Output = U>,
152 +{
153 + simd_shuffle32(x, y, IDX)
154 +}
155 +
156 +#[allow(clippy::missing_safety_doc)]
157 +#[inline]
158 +pub unsafe fn __shuffle_vector64<const IDX: [u32; 64], T, U>(x: T, y: T) -> U
159 +where
160 + T: Simd,
161 + <T as Simd>::Element: Shuffle<[u32; 64], Output = U>,
162 +{
163 + simd_shuffle64(x, y, IDX)
164 +}
165 +
123166 extern "platform-intrinsic" {
124 - // FIXME: Passing this intrinsics an `idx` array with an index that is
125 - // out-of-bounds will produce a monomorphization-time error.
126 - // https://github.com/rust-lang-nursery/packed_simd/issues/21
167 @@ -12,47 +81,2 @@
168 // https://github.com/rust-lang-nursery/packed_simd/issues/21
127169 - #[rustc_args_required_const(2)]
128170 - pub fn simd_shuffle2<T, U>(x: T, y: T, idx: [u32; 2]) -> U
129171 - where
167209 -pub use self::simd_shuffle4 as __shuffle_vector4;
168210 -pub use self::simd_shuffle64 as __shuffle_vector64;
169211 -pub use self::simd_shuffle8 as __shuffle_vector8;
170 + pub fn simd_shuffle2<T, U>(x: T, y: T, idx: [u32; 2]) -> U;
171 + pub fn simd_shuffle4<T, U>(x: T, y: T, idx: [u32; 4]) -> U;
172 + pub fn simd_shuffle8<T, U>(x: T, y: T, idx: [u32; 8]) -> U;
173 + pub fn simd_shuffle16<T, U>(x: T, y: T, idx: [u32; 16]) -> U;
174 + pub fn simd_shuffle32<T, U>(x: T, y: T, idx: [u32; 32]) -> U;
175 + pub fn simd_shuffle64<T, U>(x: T, y: T, idx: [u32; 64]) -> U;
176 +}
177 +
178 +#[allow(clippy::missing_safety_doc)]
179 +#[inline]
180 +pub unsafe fn __shuffle_vector2<const IDX: [u32; 2], T, U>(x: T, y: T) -> U
181 +where
182 + T: Simd,
183 + <T as Simd>::Element: Shuffle<[u32; 2], Output = U>,
184 +{
185 + simd_shuffle2(x, y, IDX)
186 +}
187 +
188 +#[allow(clippy::missing_safety_doc)]
189 +#[inline]
190 +pub unsafe fn __shuffle_vector4<const IDX: [u32; 4], T, U>(x: T, y: T) -> U
191 +where
192 + T: Simd,
193 + <T as Simd>::Element: Shuffle<[u32; 4], Output = U>,
194 +{
195 + simd_shuffle4(x, y, IDX)
196 +}
197 +
198 +#[allow(clippy::missing_safety_doc)]
199 +#[inline]
200 +pub unsafe fn __shuffle_vector8<const IDX: [u32; 8], T, U>(x: T, y: T) -> U
201 +where
202 + T: Simd,
203 + <T as Simd>::Element: Shuffle<[u32; 8], Output = U>,
204 +{
205 + simd_shuffle8(x, y, IDX)
206 +}
207 +
208 +#[allow(clippy::missing_safety_doc)]
209 +#[inline]
210 +pub unsafe fn __shuffle_vector16<const IDX: [u32; 16], T, U>(x: T, y: T) -> U
211 +where
212 + T: Simd,
213 + <T as Simd>::Element: Shuffle<[u32; 16], Output = U>,
214 +{
215 + simd_shuffle16(x, y, IDX)
216 +}
217 +
218 +#[allow(clippy::missing_safety_doc)]
219 +#[inline]
220 +pub unsafe fn __shuffle_vector32<const IDX: [u32; 32], T, U>(x: T, y: T) -> U
221 +where
222 + T: Simd,
223 + <T as Simd>::Element: Shuffle<[u32; 32], Output = U>,
224 +{
225 + simd_shuffle32(x, y, IDX)
226 +}
227 +
228 +#[allow(clippy::missing_safety_doc)]
229 +#[inline]
230 +pub unsafe fn __shuffle_vector64<const IDX: [u32; 64], T, U>(x: T, y: T) -> U
231 +where
232 + T: Simd,
233 + <T as Simd>::Element: Shuffle<[u32; 64], Output = U>,
234 +{
235 + simd_shuffle64(x, y, IDX)
236 +}
237
238 extern "platform-intrinsic" {
212 -
213 -extern "platform-intrinsic" {
239214 crate fn simd_eq<T, U>(x: T, y: T) -> U;
240 Index: rust-packed-simd-0.3.3/src/lib.rs
241 ===================================================================
242 --- rust-packed-simd-0.3.3.orig/src/lib.rs
243 +++ rust-packed-simd-0.3.3/src/lib.rs
244 @@ -200,6 +200,7 @@
245 //! preserving, etc.
246
215 only in patch2:
216 --- packed-simd.orig/src/lib.rs
217 +++ packed-simd/src/lib.rs
218 @@ -202,2 +202,3 @@
247219 #![feature(
248220 + const_generics,
249221 repr_simd,
250 platform_intrinsics,
251 stdsimd,
252 @@ -215,6 +216,7 @@
253 // FIXME: these types are unsound in C FFI already
254 // See https://github.com/rust-lang/rust/issues/53346
222 @@ -217,2 +218,3 @@
255223 improper_ctypes_definitions,
256224 + incomplete_features,
257225 clippy::cast_possible_truncation,
258 clippy::cast_lossless,
259 clippy::cast_possible_wrap,
260 @@ -225,6 +227,7 @@
261 // See https://github.com/rust-lang/rust-clippy/issues/3410
262 clippy::use_self,
226 @@ -227,2 +229,3 @@
263227 clippy::wrong_self_convention,
264228 + clippy::from_over_into,
265229 )]
266 #![cfg_attr(test, feature(hashmap_internals))]
267 #![deny(warnings, rust_2018_idioms, clippy::missing_inline_in_public_items)]