Struct f32x16

#[repr(C, align(64))]
pub struct f32x16<S: Simd> { pub simd: S, /* private fields */ }

A SIMD vector of 16 f32 elements.

This type's memory layout is identical to that of [f32; 16], except that it is aligned to 64 bytes.

You may construct this vector type using the Self::splat, Self::from_slice, Self::simd_from, Self::from_fn, and Self::block_splat methods.

# use fearless_simd::{prelude::*, f32x16};
fn construct_simd<S: Simd>(simd: S) {
    // From a single scalar value:
    let a = f32x16::splat(simd, 1.0);
    let b = f32x16::simd_from(simd, 1.0);

    // From a slice:
    let c = f32x16::from_slice(simd, &[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0]);

    // From an array:
    let d = f32x16::simd_from(simd, [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0]);

    // From an element-wise function:
    let e = f32x16::from_fn(simd, |i| i as f32);
    # use fearless_simd::f32x4;
    // From `Self::Block`:
    let f = f32x16::block_splat(f32x4::simd_from(simd, [1.0, 2.0, 3.0, 4.0]));
}

Fields

simd: S

Trait Implementations

impl<S: Clone + Simd> Clone for f32x16<S> where S::f32x16: Clone,

fn clone(&self) -> Self

impl<S: Copy + Simd> Copy for f32x16<S> where S::f32x16: Copy,

impl<S: Simd + Debug> Debug for f32x16<S>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<S: Simd> Add for f32x16<S>

type Output = f32x16<S>;
fn add(self, rhs: Self) -> Self::Output

Add two vectors element-wise.

impl<S: Simd> Add<f32> for f32x16<S>

type Output = f32x16<S>;
fn add(self, rhs: f32) -> Self::Output

impl<S: Simd> AddAssign for f32x16<S>

fn add_assign(&mut self, rhs: Self)

Add two vectors element-wise.

impl<S: Simd> AddAssign<f32> for f32x16<S>

fn add_assign(&mut self, rhs: f32)

impl<S: Simd> Bytes for f32x16<S>

type Bytes = u8x64<S>;
fn to_bytes(self) -> Self::Bytes
fn from_bytes(value: Self::Bytes) -> Self

impl<S: Simd> Deref for f32x16<S>

type Target = [f32; 16];
fn deref(&self) -> &Self::Target

impl<S: Simd> DerefMut for f32x16<S>

fn deref_mut(&mut self) -> &mut Self::Target

impl<S: Simd> Div for f32x16<S>

type Output = f32x16<S>;
fn div(self, rhs: Self) -> Self::Output

Divide two vectors element-wise.

impl<S: Simd> Div<f32> for f32x16<S>

type Output = f32x16<S>;
fn div(self, rhs: f32) -> Self::Output

impl<S: Simd> DivAssign for f32x16<S>

fn div_assign(&mut self, rhs: Self)

Divide two vectors element-wise.

impl<S: Simd> DivAssign<f32> for f32x16<S>

fn div_assign(&mut self, rhs: f32)

impl<S: Simd> ExtractToken for f32x16<S>

type S = S;
fn token(&self) -> S

impl<S: Simd> Index<usize> for f32x16<S>

type Output = f32;
fn index(&self, i: usize) -> &Self::Output

impl<S: Simd> IndexMut<usize> for f32x16<S>

fn index_mut(&mut self, i: usize) -> &mut Self::Output

impl<S: Simd> Mul for f32x16<S>

type Output = f32x16<S>;
fn mul(self, rhs: Self) -> Self::Output

Multiply two vectors element-wise.

impl<S: Simd> Mul<f32> for f32x16<S>

type Output = f32x16<S>;
fn mul(self, rhs: f32) -> Self::Output

impl<S: Simd> MulAssign for f32x16<S>

fn mul_assign(&mut self, rhs: Self)

Multiply two vectors element-wise.

impl<S: Simd> MulAssign<f32> for f32x16<S>

fn mul_assign(&mut self, rhs: f32)

impl<S: Simd> Neg for f32x16<S>

type Output = f32x16<S>;
fn neg(self) -> Self::Output

Negate each element of the vector.

impl<S: Simd> SimdBase<S> for f32x16<S>

type Element = f32;
type ByteVector = u8x64<S>;
const LEN: usize = 16;
type Mask = mask32x16<S>;
type Block = f32x4<S>;
type Array = [f32; 16];
fn as_slice(&self) -> &[f32]
fn as_mut_slice(&mut self) -> &mut [f32]
fn from_slice(simd: S, slice: &[f32]) -> Self
fn store_slice(&self, slice: &mut [f32])
fn splat(simd: S, val: f32) -> Self
fn block_splat(block: Self::Block) -> Self
fn from_fn(simd: S, f: impl FnMut(usize) -> f32) -> Self
fn slide<const SHIFT: usize>(self, rhs: impl SimdInto<Self, S>) -> Self
fn slide_within_blocks<const SHIFT: usize>(self, rhs: impl SimdInto<Self, S>) -> Self
fn swizzle_dyn_within_blocks(self, indices: impl SimdInto<Self::Bytes, S>) -> Self
fn swizzle_dyn(self, indices: impl SimdInto<Self::Bytes, S>) -> Self
fn swizzle_dyn_precise(self, indices: impl SimdInto<Self::Bytes, S>) -> Self
fn abs(self) -> Self
fn reverse(self) -> Self
fn concat_swizzle_dyn(self, rhs: impl SimdInto<Self, S>, indices: impl SimdInto<Self::Bytes, S>) -> Self
fn concat_swizzle_dyn_precise(self, rhs: impl SimdInto<Self, S>, indices: impl SimdInto<Self::Bytes, S>) -> Self
fn compress(self, mask: Self::Mask) -> Self
fn compress_merge(self, mask: Self::Mask, merge: impl SimdInto<Self, S>) -> Self
fn expand(self, mask: Self::Mask) -> Self
fn expand_merge(self, mask: Self::Mask, merge: impl SimdInto<Self, S>) -> Self
fn reduce_max(self) -> Self::Element
fn reduce_min(self) -> Self::Element
fn reduce_max_precise(self) -> Self::Element
fn reduce_min_precise(self) -> Self::Element
fn reduce_sum(self) -> Self::Element
fn reduce_product(self) -> Self::Element
fn max(self, rhs: impl SimdInto<Self, S>) -> Self
fn min(self, rhs: impl SimdInto<Self, S>) -> Self
fn max_precise(self, rhs: impl SimdInto<Self, S>) -> Self
fn min_precise(self, rhs: impl SimdInto<Self, S>) -> Self
fn clamp(self, min: impl SimdInto<Self, S>, max: impl SimdInto<Self, S>) -> Self
fn simd_eq(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
fn simd_ne(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
fn simd_lt(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
fn simd_le(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
fn simd_ge(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
fn simd_gt(self, rhs: impl SimdInto<Self, S>) -> Self::Mask
fn zip_low(self, rhs: impl SimdInto<Self, S>) -> Self
fn zip_high(self, rhs: impl SimdInto<Self, S>) -> Self
fn unzip_low(self, rhs: impl SimdInto<Self, S>) -> Self
fn unzip_high(self, rhs: impl SimdInto<Self, S>) -> Self
fn interleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)
fn deinterleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)

impl<S: Simd> SimdCvtFloat<i32x16<S>> for f32x16<S>

fn float_from(x: i32x16<S>) -> Self

Convert each signed 32-bit integer element to a floating-point value.

Values that cannot be exactly represented are rounded to the nearest representable value.

impl<S: Simd> SimdCvtFloat<u32x16<S>> for f32x16<S>

fn float_from(x: u32x16<S>) -> Self

Convert each unsigned 32-bit integer element to a floating-point value.

Values that cannot be exactly represented are rounded to the nearest representable value.

impl<S: Simd> SimdFloat<S> for f32x16<S>

type Bits = u32x16<S>;
fn sqrt(self) -> Self
fn approximate_recip(self) -> Self
fn copysign(self, rhs: impl SimdInto<Self, S>) -> Self
fn mul_add(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Self
fn mul_add_precise(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Self
fn mul_sub(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Self
fn mul_sub_precise(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Self
fn floor(self) -> Self
fn ceil(self) -> Self
fn round_ties_even(self) -> Self
fn round(self) -> Self
fn fract(self) -> Self
fn trunc(self) -> Self
fn to_degrees(self) -> Self
fn to_radians(self) -> Self
fn is_nan(self) -> Self::Mask
fn is_infinite(self) -> Self::Mask
fn is_finite(self) -> Self::Mask
fn is_subnormal(self) -> Self::Mask
fn is_normal(self) -> Self::Mask
fn is_sign_positive(self) -> Self::Mask
fn is_sign_negative(self) -> Self::Mask

impl<S: Simd> SimdFrom<[f32; 16], S> for f32x16<S>

fn simd_from(simd: S, val: [f32; 16]) -> Self

impl<S: Simd> SimdFrom<__m512, S> for f32x16<S>

fn simd_from(simd: S, arch: __m512) -> Self

impl<S: Simd> SimdFrom<f32, S> for f32x16<S>

fn simd_from(simd: S, value: f32) -> Self

impl<S: Simd> SimdSplit<S> for f32x16<S>

type Split = f32x8<S>;
fn split(self) -> (Self::Split, Self::Split)

impl<S: Simd> SimdWiden<S> for f32x16<S>

type Widened = f64x8<S>;
fn widen(self) -> (Self::Widened, Self::Widened)

impl<S: Simd> Sub for f32x16<S>

type Output = f32x16<S>;
fn sub(self, rhs: Self) -> Self::Output

Subtract two vectors element-wise.

impl<S: Simd> Sub<f32> for f32x16<S>

type Output = f32x16<S>;
fn sub(self, rhs: f32) -> Self::Output

impl<S: Simd> SubAssign for f32x16<S>

fn sub_assign(&mut self, rhs: Self)

Subtract two vectors element-wise.

impl<S: Simd> SubAssign<f32> for f32x16<S>

fn sub_assign(&mut self, rhs: f32)

Auto Trait Implementations

impl<S> Freeze for f32x16<S> where <S as ArchTypes>::f32x16: Freeze, S: Freeze,

impl<S> RefUnwindSafe for f32x16<S> where <S as ArchTypes>::f32x16: RefUnwindSafe, S: RefUnwindSafe,

impl<S> Send for f32x16<S> where <S as ArchTypes>::f32x16: Send,

impl<S> Sync for f32x16<S> where <S as ArchTypes>::f32x16: Sync,

impl<S> Unpin for f32x16<S> where <S as ArchTypes>::f32x16: Unpin, S: Unpin,

impl<S> UnsafeUnpin for f32x16<S> where <S as ArchTypes>::f32x16: UnsafeUnpin, S: UnsafeUnpin,

impl<S> UnwindSafe for f32x16<S> where <S as ArchTypes>::f32x16: UnwindSafe, S: UnwindSafe,

Blanket Implementations

impl<F, T, S> SimdInto<T, S> for f32x16<S> where T: SimdFrom<F, S>, S: Simd,

impl<P, T> Receiver for f32x16<S> where P: Deref<Target = T> + ?Sized, T: ?Sized,

impl<T> Any for f32x16<S> where T: 'static + ?Sized,

impl<T> Borrow<T> for f32x16<S> where T: ?Sized,

impl<T> BorrowMut<T> for f32x16<S> where T: ?Sized,

impl<T> CloneToUninit for f32x16<S> where T: Clone,

impl<T> From<T> for f32x16<S>

impl<T> ToOwned for f32x16<S> where T: Clone,

impl<T, S> SimdFrom<T, S> for f32x16<S> where S: Simd,

impl<T, U> Into<U> for f32x16<S> where U: From<T>,

impl<T, U> TryFrom<U> for f32x16<S> where U: Into<T>,

impl<T, U> TryInto<U> for f32x16<S> where U: TryFrom<T>,