On this page
Trait std::simd::Swizzle2
pub trait Swizzle2<const INPUT_LANES: usize, const OUTPUT_LANES: usize> {
const INDEX: [Which; OUTPUT_LANES];
// Provided method
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 vector from the elements of two other vectors.
Required Associated Constants
const INDEX: [Which; OUTPUT_LANES]
🔬This is a nightly-only experimental API. (
portable_simd
#86656)
Map from the lanes of the input vectors to the output vector
Provided Methods
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)
.
Object Safety
This trait is not object safe.
Implementors
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/simd/trait.Swizzle2.html