Skip to content

Commit d7df264

Browse files
committed
simd_shuffle: pass the idx argument as a vector
1 parent 5dfe757 commit d7df264

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/core_arch/src/macros.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,14 @@ macro_rules! types {
114114
)*);
115115
}
116116

117+
#[allow(unused)]
118+
#[repr(simd)]
119+
pub(crate) struct SimdShuffleIdx<const LEN: usize>(pub(crate) [u32; LEN]);
120+
117121
#[allow(unused)]
118122
macro_rules! simd_shuffle {
119123
($x:expr, $y:expr, $idx:expr $(,)?) => {{
120-
$crate::intrinsics::simd::simd_shuffle::<_, [u32; _], _>($x, $y, const { $idx })
124+
$crate::intrinsics::simd::simd_shuffle($x, $y, const { $crate::core_arch::macros::SimdShuffleIdx($idx) })
121125
}};
122126
}
123127

0 commit comments

Comments
 (0)