pub trait Swizzle2<const INPUT_LANES: usize, const OUTPUT_LANES: usize> {
const INDEX: [Which; OUTPUT_LANES];
fn swizzle2<T>(
first: Simd<T, INPUT_LANES>,
second: Simd<T, INPUT_LANES>
) -> Simd<T, OUTPUT_LANES>
where
T: SimdElement,
LaneCount<INPUT_LANES>: SupportedLaneCount,
LaneCount<OUTPUT_LANES>: SupportedLaneCount,
{ ... }
}
🔬This is a nightly-only experimental API. (
portable_simd
#86656)Expand description
Create a vector from the elements of two other vectors.
Required Associated Constants
Provided Methods
sourcefn swizzle2<T>(
first: Simd<T, INPUT_LANES>,
second: Simd<T, INPUT_LANES>
) -> Simd<T, OUTPUT_LANES> where
T: SimdElement,
LaneCount<INPUT_LANES>: SupportedLaneCount,
LaneCount<OUTPUT_LANES>: SupportedLaneCount,
fn swizzle2<T>(
first: Simd<T, INPUT_LANES>,
second: Simd<T, INPUT_LANES>
) -> Simd<T, OUTPUT_LANES> where
T: SimdElement,
LaneCount<INPUT_LANES>: SupportedLaneCount,
LaneCount<OUTPUT_LANES>: SupportedLaneCount,
🔬This is a nightly-only experimental API. (
portable_simd
#86656)Create a new vector from the lanes of first
and second
.
Lane i
is first[j]
when Self::INDEX[i]
is First(j)
, or second[j]
when it is
Second(j)
.