Struct f32x8
#[repr(C, align(32))]
pub struct f32x8<S: Simd> { pub simd: S, /* private fields */ }
A SIMD vector of 8 f32 elements.
This type's memory layout is identical to that of [f32; 8], except that it is aligned to 32 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::*, f32x8};
fn construct_simd<S: Simd>(simd: S) {
// From a single scalar value:
let a = f32x8::splat(simd, 1.0);
let b = f32x8::simd_from(simd, 1.0);
// From a slice:
let c = f32x8::from_slice(simd, &[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]);
// From an array:
let d = f32x8::simd_from(simd, [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]);
// From an element-wise function:
let e = f32x8::from_fn(simd, |i| i as f32);
# use fearless_simd::f32x4;
// From `Self::Block`:
let f = f32x8::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 f32x8<S>
where
S::f32x8: Clone,
fn clone(&self) -> Self
impl<S: Copy + Simd> Copy for f32x8<S>
where
S::f32x8: Copy,
impl<S: Simd + Debug> Debug for f32x8<S>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<S: Simd> Add for f32x8<S>
type Output = f32x8<S>;fn add(self, rhs: Self) -> Self::OutputAdd two vectors element-wise.
impl<S: Simd> Add<f32> for f32x8<S>
type Output = f32x8<S>;fn add(self, rhs: f32) -> Self::Output
impl<S: Simd> AddAssign for f32x8<S>
fn add_assign(&mut self, rhs: Self)Add two vectors element-wise.
impl<S: Simd> AddAssign<f32> for f32x8<S>
fn add_assign(&mut self, rhs: f32)
impl<S: Simd> Bytes for f32x8<S>
type Bytes = u8x32<S>;fn to_bytes(self) -> Self::Bytesfn from_bytes(value: Self::Bytes) -> Self
impl<S: Simd> Deref for f32x8<S>
type Target = [f32; 8];fn deref(&self) -> &Self::Target
impl<S: Simd> DerefMut for f32x8<S>
fn deref_mut(&mut self) -> &mut Self::Target
impl<S: Simd> Div for f32x8<S>
type Output = f32x8<S>;fn div(self, rhs: Self) -> Self::OutputDivide two vectors element-wise.
impl<S: Simd> Div<f32> for f32x8<S>
type Output = f32x8<S>;fn div(self, rhs: f32) -> Self::Output
impl<S: Simd> DivAssign for f32x8<S>
fn div_assign(&mut self, rhs: Self)Divide two vectors element-wise.
impl<S: Simd> DivAssign<f32> for f32x8<S>
fn div_assign(&mut self, rhs: f32)
impl<S: Simd> ExtractToken for f32x8<S>
type S = S;fn token(&self) -> S
impl<S: Simd> Index<usize> for f32x8<S>
type Output = f32;fn index(&self, i: usize) -> &Self::Output
impl<S: Simd> IndexMut<usize> for f32x8<S>
fn index_mut(&mut self, i: usize) -> &mut Self::Output
impl<S: Simd> Mul for f32x8<S>
type Output = f32x8<S>;fn mul(self, rhs: Self) -> Self::OutputMultiply two vectors element-wise.
impl<S: Simd> Mul<f32> for f32x8<S>
type Output = f32x8<S>;fn mul(self, rhs: f32) -> Self::Output
impl<S: Simd> MulAssign for f32x8<S>
fn mul_assign(&mut self, rhs: Self)Multiply two vectors element-wise.
impl<S: Simd> MulAssign<f32> for f32x8<S>
fn mul_assign(&mut self, rhs: f32)
impl<S: Simd> Neg for f32x8<S>
type Output = f32x8<S>;fn neg(self) -> Self::OutputNegate each element of the vector.
impl<S: Simd> SimdBase<S> for f32x8<S>
type Element = f32;type ByteVector = u8x32<S>;const LEN: usize = 8;type Mask = mask32x8<S>;type Block = f32x4<S>;type Array = [f32; 8];fn as_slice(&self) -> &[f32]fn as_mut_slice(&mut self) -> &mut [f32]fn from_slice(simd: S, slice: &[f32]) -> Selffn store_slice(&self, slice: &mut [f32])fn splat(simd: S, val: f32) -> Selffn block_splat(block: Self::Block) -> Selffn from_fn(simd: S, f: impl FnMut(usize) -> f32) -> Selffn slide<const SHIFT: usize>(self, rhs: impl SimdInto<Self, S>) -> Selffn slide_within_blocks<const SHIFT: usize>(self, rhs: impl SimdInto<Self, S>) -> Selffn swizzle_dyn_within_blocks(self, indices: impl SimdInto<Self::Bytes, S>) -> Selffn swizzle_dyn(self, indices: impl SimdInto<Self::Bytes, S>) -> Selffn swizzle_dyn_precise(self, indices: impl SimdInto<Self::Bytes, S>) -> Selffn abs(self) -> Selffn reverse(self) -> Selffn concat_swizzle_dyn(self, rhs: impl SimdInto<Self, S>, indices: impl SimdInto<Self::Bytes, S>) -> Selffn concat_swizzle_dyn_precise(self, rhs: impl SimdInto<Self, S>, indices: impl SimdInto<Self::Bytes, S>) -> Selffn compress(self, mask: Self::Mask) -> Selffn compress_merge(self, mask: Self::Mask, merge: impl SimdInto<Self, S>) -> Selffn expand(self, mask: Self::Mask) -> Selffn expand_merge(self, mask: Self::Mask, merge: impl SimdInto<Self, S>) -> Selffn reduce_max(self) -> Self::Elementfn reduce_min(self) -> Self::Elementfn reduce_max_precise(self) -> Self::Elementfn reduce_min_precise(self) -> Self::Elementfn reduce_sum(self) -> Self::Elementfn reduce_product(self) -> Self::Elementfn max(self, rhs: impl SimdInto<Self, S>) -> Selffn min(self, rhs: impl SimdInto<Self, S>) -> Selffn max_precise(self, rhs: impl SimdInto<Self, S>) -> Selffn min_precise(self, rhs: impl SimdInto<Self, S>) -> Selffn clamp(self, min: impl SimdInto<Self, S>, max: impl SimdInto<Self, S>) -> Selffn simd_eq(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn simd_ne(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn simd_lt(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn simd_le(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn simd_ge(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn simd_gt(self, rhs: impl SimdInto<Self, S>) -> Self::Maskfn zip_low(self, rhs: impl SimdInto<Self, S>) -> Selffn zip_high(self, rhs: impl SimdInto<Self, S>) -> Selffn unzip_low(self, rhs: impl SimdInto<Self, S>) -> Selffn unzip_high(self, rhs: impl SimdInto<Self, S>) -> Selffn interleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)fn deinterleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)
impl<S: Simd> SimdCombine<S> for f32x8<S>
type Combined = f32x16<S>;fn combine(self, rhs: impl SimdInto<Self, S>) -> Self::Combined
impl<S: Simd> SimdCvtFloat<i32x8<S>> for f32x8<S>
fn float_from(x: i32x8<S>) -> SelfConvert 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<u32x8<S>> for f32x8<S>
fn float_from(x: u32x8<S>) -> SelfConvert 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 f32x8<S>
type Bits = u32x8<S>;fn sqrt(self) -> Selffn approximate_recip(self) -> Selffn copysign(self, rhs: impl SimdInto<Self, S>) -> Selffn mul_add(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Selffn mul_add_precise(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Selffn mul_sub(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Selffn mul_sub_precise(self, op1: impl SimdInto<Self, S>, op2: impl SimdInto<Self, S>) -> Selffn floor(self) -> Selffn ceil(self) -> Selffn round_ties_even(self) -> Selffn round(self) -> Selffn fract(self) -> Selffn trunc(self) -> Selffn to_degrees(self) -> Selffn to_radians(self) -> Selffn is_nan(self) -> Self::Maskfn is_infinite(self) -> Self::Maskfn is_finite(self) -> Self::Maskfn is_subnormal(self) -> Self::Maskfn is_normal(self) -> Self::Maskfn is_sign_positive(self) -> Self::Maskfn is_sign_negative(self) -> Self::Mask
impl<S: Simd> SimdFrom<[f32; 8], S> for f32x8<S>
fn simd_from(simd: S, val: [f32; 8]) -> Self
impl<S: Simd> SimdFrom<__m256, S> for f32x8<S>
fn simd_from(simd: S, arch: __m256) -> Self
impl<S: Simd> SimdFrom<f32, S> for f32x8<S>
fn simd_from(simd: S, value: f32) -> Self
impl<S: Simd> SimdSplit<S> for f32x8<S>
type Split = f32x4<S>;fn split(self) -> (Self::Split, Self::Split)
impl<S: Simd> SimdWiden<S> for f32x8<S>
type Widened = f64x4<S>;fn widen(self) -> (Self::Widened, Self::Widened)
impl<S: Simd> Sub for f32x8<S>
type Output = f32x8<S>;fn sub(self, rhs: Self) -> Self::OutputSubtract two vectors element-wise.
impl<S: Simd> Sub<f32> for f32x8<S>
type Output = f32x8<S>;fn sub(self, rhs: f32) -> Self::Output
impl<S: Simd> SubAssign for f32x8<S>
fn sub_assign(&mut self, rhs: Self)Subtract two vectors element-wise.
impl<S: Simd> SubAssign<f32> for f32x8<S>
fn sub_assign(&mut self, rhs: f32)