]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | // rustfmt-wrap_comments: true |
2 | ||
3 | /// Although the indentation of the skipped method is off, it shouldn't be | |
4 | /// changed. | |
5 | /// | |
6 | /// ``` | |
7 | /// pub unsafe fn _mm256_shufflehi_epi16(a: __m256i, imm8: i32) -> __m256i { | |
8 | /// let imm8 = (imm8 & 0xFF) as u8; | |
9 | /// let a = a.as_i16x16(); | |
10 | /// macro_rules! shuffle_done { | |
11 | /// ($x01:expr, $x23:expr, $x45:expr, $x67:expr) => { | |
12 | /// #[cfg_attr(rustfmt, rustfmt_skip)] | |
13 | /// simd_shuffle16(a, a, [ | |
14 | /// 0, 1, 2, 3, 4+$x01, 4+$x23, 4+$x45, 4+$x67, | |
15 | /// 8, 9, 10, 11, 12+$x01, 12+$x23, 12+$x45, 12+$x67 | |
16 | /// ]); | |
17 | /// }; | |
18 | /// } | |
19 | /// } | |
20 | /// ``` | |
21 | pub unsafe fn _mm256_shufflehi_epi16(a: __m256i, imm8: i32) -> __m256i { | |
22 | let imm8 = (imm8 & 0xFF) as u8; | |
23 | let a = a.as_i16x16(); | |
24 | macro_rules! shuffle_done { | |
25 | ($x01:expr, $x23:expr, $x45:expr, $x67:expr) => { | |
26 | #[cfg_attr(rustfmt, rustfmt_skip)] | |
27 | simd_shuffle16(a, a, [ | |
28 | 0, 1, 2, 3, 4+$x01, 4+$x23, 4+$x45, 4+$x67, | |
29 | 8, 9, 10, 11, 12+$x01, 12+$x23, 12+$x45, 12+$x67 | |
30 | ]); | |
31 | }; | |
32 | } | |
33 | } | |
34 | ||
35 | /// The skipped method shouldn't right-shift | |
36 | pub unsafe fn _mm256_shufflehi_epi32(a: __m256i, imm8: i32) -> __m256i { | |
37 | let imm8 = (imm8 & 0xFF) as u8; | |
38 | let a = a.as_i16x16(); | |
39 | macro_rules! shuffle_done { | |
40 | ($x01:expr, $x23:expr, $x45:expr, $x67:expr) => { | |
41 | #[cfg_attr(rustfmt, rustfmt_skip)] | |
42 | simd_shuffle32(a, a, [ | |
43 | 0, 1, 2, 3, 4+$x01, 4+$x23, 4+$x45, 4+$x67, | |
44 | 8, 9, 10, 11, 12+$x01, 12+$x23, 12+$x45, 12+$x67 | |
45 | ]); | |
46 | }; | |
47 | } | |
48 | } |