diff --git a/src/simd.rs b/src/simd.rs index 1701c08..38cad01 100644 --- a/src/simd.rs +++ b/src/simd.rs @@ -136,7 +136,7 @@ where let lo = shifted.cast::(); let hi = (shifted >> Simd::splat(8)).cast::(); - let decoded_chunks = lo | hi.rotate_lanes_left::<1>(); + let decoded_chunks = lo | hi.rotate_elements_left::<1>(); let output = swizzle!(N; decoded_chunks, array!(N; |i| i + i / 3)); @@ -158,7 +158,7 @@ where // Note that we also need to undo the rotate we did to `hi`. let lo = data & mask; - let hi = (data & !mask).rotate_lanes_right::<1>(); + let hi = (data & !mask).rotate_elements_right::<1>(); // Interleave the shuffled pieces and undo the shift. let shifted = lo.cast::() | (hi.cast::() << Simd::splat(8)); diff --git a/src/util.rs b/src/util.rs index d88403e..00ea6cc 100644 --- a/src/util.rs +++ b/src/util.rs @@ -75,23 +75,23 @@ macro_rules! swizzle { ($N:ident; $x:expr, $index:expr) => {{ use std::simd::*; struct Swz; - impl Swizzle2<$N, $N> for Swz + impl Swizzle<$N> for Swz where LaneCount<$N>: SupportedLaneCount, { - const INDEX: [Which; $N] = { + const INDEX: [usize; $N] = { let index = $index; array!($N; |i| { let i = index[i]; if i >= $N { - Which::Second(0) + $N } else { - Which::First(i) + i } }) }; } - Swz::swizzle2($x, Simd::splat(0)) + Swz::concat_swizzle($x, Simd::splat(0)) }}; }