pub trait Swizzle<const INPUT_LANES: usize, const OUTPUT_LANES: usize> {
    const INDEX: [usize; OUTPUT_LANES];

    // Provided method
    fn swizzle<T>(vector: 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 another vector.

Required Associated Constants§

source

const INDEX: [usize; OUTPUT_LANES]

🔬This is a nightly-only experimental API. (portable_simd #86656)

Map from the lanes of the input vector to the output vector.

Provided Methods§

source

fn swizzle<T>(vector: 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 vector.

Lane i of the output is vector[Self::INDEX[i]].

Implementors§

source§

impl<const LANES: usize> Swizzle<LANES, LANES> for Reverse

source§

const INDEX: [usize; LANES] = _

source§

impl<const N: usize> Swizzle<1, N> for Splat

source§

const INDEX: [usize; N] = _

source§

impl<const OFFSET: usize, const LANES: usize> Swizzle<LANES, LANES> for Rotate<OFFSET>

source§

const INDEX: [usize; LANES] = _

source§

impl<const OFFSET: usize, const LANES: usize> Swizzle<LANES, LANES> for Rotate<OFFSET>

source§

const INDEX: [usize; LANES] = _