Skip to main content

AvxVector128

Trait AvxVector128 

Source
pub trait AvxVector128: AvxVector {
    type FullVector: AvxVector256<HalfVector = Self>;

    // Required methods
    unsafe fn merge(lo: Self, hi: Self) -> Self::FullVector;
    unsafe fn zero_extend(self) -> Self::FullVector;
    unsafe fn lo(input: Self::FullVector) -> Self;
    unsafe fn hi(input: Self::FullVector) -> Self;
    unsafe fn lo_rotation(
        input: Rotation90<Self::FullVector>,
    ) -> Rotation90<Self>;
    unsafe fn broadcast_complex_elements(
        value: Complex<<<Self as AvxVector128>::FullVector as AvxVector256>::ScalarType>,
    ) -> Self;
    unsafe fn gather32_complex_avx2(
        ptr: *const Complex<<Self::FullVector as AvxVector256>::ScalarType>,
        indexes: __m128i,
    ) -> Self;
    unsafe fn gather64_complex_avx2(
        ptr: *const Complex<<Self::FullVector as AvxVector256>::ScalarType>,
        indexes: __m128i,
    ) -> Self;

    // Provided methods
    unsafe fn split(input: Self::FullVector) -> (Self, Self) { ... }
    unsafe fn column_butterfly6(
        rows: [Self; 6],
        twiddles: Self::FullVector,
    ) -> [Self; 6] { ... }
    unsafe fn column_butterfly9(
        rows: [Self; 9],
        twiddles_merged: [Self::FullVector; 2],
        butterfly3_twiddles: Self::FullVector,
    ) -> [Self; 9] { ... }
    unsafe fn column_butterfly12(
        rows: [Self; 12],
        butterfly3_twiddles: Self::FullVector,
        rotation: Rotation90<Self::FullVector>,
    ) -> [Self; 12] { ... }
}
Expand description

A 128-bit SIMD vector of complex numbers, stored with the real values and imaginary values interleaved. Implemented for __m128, __m128d, but these are all oriented around AVX, so don’t call methods on these from a SSE-only context

This trait implements things specific to 128-types, like merging 2 128 vectors into a 256 vector

Required Associated Types§

Source

type FullVector: AvxVector256<HalfVector = Self>

Required Methods§

Source

unsafe fn merge(lo: Self, hi: Self) -> Self::FullVector

Source

unsafe fn zero_extend(self) -> Self::FullVector

Source

unsafe fn lo(input: Self::FullVector) -> Self

Source

unsafe fn hi(input: Self::FullVector) -> Self

Source

unsafe fn lo_rotation(input: Rotation90<Self::FullVector>) -> Rotation90<Self>

Source

unsafe fn broadcast_complex_elements( value: Complex<<<Self as AvxVector128>::FullVector as AvxVector256>::ScalarType>, ) -> Self

Fill a vector by repeating the provided complex number as many times as possible

Source

unsafe fn gather32_complex_avx2( ptr: *const Complex<<Self::FullVector as AvxVector256>::ScalarType>, indexes: __m128i, ) -> Self

Source

unsafe fn gather64_complex_avx2( ptr: *const Complex<<Self::FullVector as AvxVector256>::ScalarType>, indexes: __m128i, ) -> Self

Provided Methods§

Source

unsafe fn split(input: Self::FullVector) -> (Self, Self)

Source

unsafe fn column_butterfly6( rows: [Self; 6], twiddles: Self::FullVector, ) -> [Self; 6]

Source

unsafe fn column_butterfly9( rows: [Self; 9], twiddles_merged: [Self::FullVector; 2], butterfly3_twiddles: Self::FullVector, ) -> [Self; 9]

Source

unsafe fn column_butterfly12( rows: [Self; 12], butterfly3_twiddles: Self::FullVector, rotation: Rotation90<Self::FullVector>, ) -> [Self; 12]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AvxVector128 for __m128

Source§

type FullVector = __m256

Source§

unsafe fn lo(input: Self::FullVector) -> Self

Source§

unsafe fn hi(input: Self::FullVector) -> Self

Source§

unsafe fn merge(lo: Self, hi: Self) -> Self::FullVector

Source§

unsafe fn zero_extend(self) -> Self::FullVector

Source§

unsafe fn lo_rotation(input: Rotation90<Self::FullVector>) -> Rotation90<Self>

Source§

unsafe fn broadcast_complex_elements(value: Complex<f32>) -> Self

Source§

unsafe fn gather32_complex_avx2( ptr: *const Complex<f32>, indexes: __m128i, ) -> Self

Source§

unsafe fn gather64_complex_avx2( ptr: *const Complex<f32>, indexes: __m128i, ) -> Self

Source§

impl AvxVector128 for __m128d

Source§

type FullVector = __m256d

Source§

unsafe fn lo(input: Self::FullVector) -> Self

Source§

unsafe fn hi(input: Self::FullVector) -> Self

Source§

unsafe fn merge(lo: Self, hi: Self) -> Self::FullVector

Source§

unsafe fn zero_extend(self) -> Self::FullVector

Source§

unsafe fn lo_rotation(input: Rotation90<Self::FullVector>) -> Rotation90<Self>

Source§

unsafe fn broadcast_complex_elements(value: Complex<f64>) -> Self

Source§

unsafe fn gather32_complex_avx2( ptr: *const Complex<f64>, indexes: __m128i, ) -> Self

Source§

unsafe fn gather64_complex_avx2( ptr: *const Complex<f64>, indexes: __m128i, ) -> Self

Implementors§