Trait Swizzle

pub trait Swizzle<const N: usize>

Creates a vector from the elements of another vector.

Associated Constants

const INDEX: [usize; N];

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

Provided Methods

fn swizzle<T, const M: usize>(vector: Simd<T, M>) -> Simd<T, N>
where
    T: SimdElement,

Creates a new vector from the elements of vector.

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

fn concat_swizzle<T, const M: usize>(first: Simd<T, M>, second: Simd<T, M>) -> Simd<T, N>
where
    T: SimdElement,

Creates a new vector from the elements of first and second.

Lane i of the output is concat[Self::INDEX[i]], where concat is the concatenation of first and second.

fn swizzle_mask<T, const M: usize>(mask: Mask<T, M>) -> Mask<T, N>
where
    T: MaskElement,

Creates a new mask from the elements of mask.

Element i of the output is mask[Self::INDEX[i]].

fn concat_swizzle_mask<T, const M: usize>(first: Mask<T, M>, second: Mask<T, M>) -> Mask<T, N>
where
    T: MaskElement,

Creates a new mask from the elements of first and second.

Element i of the output is concat[Self::INDEX[i]], where concat is the concatenation of first and second.

Implementors