Struct Simd

Source
#[repr(C)]
pub struct Simd<TArray>(/* private fields */) where Self: Vector;

Implementations§

Source§

impl<TArray> Simd<TArray>
where Self: SimdImpl,

Source

pub fn splat(value: <Self as Vector>::Element) -> Self

Source§

impl<TArray> Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: PartialOrd,

Source

pub fn eq(self, other: Self) -> <Self as Vector>::MaskVector

Source

pub fn ne(self, other: Self) -> <Self as Vector>::MaskVector

Source

pub fn lt(self, other: Self) -> <Self as Vector>::MaskVector

Source

pub fn gt(self, other: Self) -> <Self as Vector>::MaskVector

Source

pub fn le(self, other: Self) -> <Self as Vector>::MaskVector

Source

pub fn ge(self, other: Self) -> <Self as Vector>::MaskVector

Source§

impl<TArray> Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: Ord,

Source

pub fn min(self, other: Self) -> Self

Source

pub fn max(self, other: Self) -> Self

Source§

impl<TArray> Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: Integer,

Source

pub fn wrapping_add(self, other: Self) -> Self

Source

pub fn wrapping_sub(self, other: Self) -> Self

Source

pub fn wrapping_mul(self, other: Self) -> Self

Source

pub fn high_mul(self, other: Self) -> Self

Source

pub fn saturating_add(self, other: Self) -> Self

Source

pub fn saturating_sub(self, other: Self) -> Self

Source

pub fn count_ones(self) -> Self

Source

pub fn count_zeros(self) -> Self

Source§

impl<TArray> Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: SignedInteger,

Source

pub fn wrapping_abs(self) -> Self

Source§

impl<TArray> Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: FloatingPoint,

Source

pub fn recip(self) -> Self

Source

pub fn to_degrees(self) -> Self

Source

pub fn to_radians(self) -> Self

Source

pub fn min_naive(self, other: Self) -> Self

Source

pub fn max_naive(self, other: Self) -> Self

Trait Implementations§

Source§

impl<TArray> Add for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: Add<Output = <Self as Vector>::Element> + FloatingPoint,

Source§

type Output = Simd<TArray>

The resulting type after applying the + operator.
Source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
Source§

impl<TArray> BitAnd for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: BitAnd<Output = <Self as Vector>::Element>,

Source§

type Output = Simd<TArray>

The resulting type after applying the & operator.
Source§

fn bitand(self, other: Self) -> Self

Performs the & operation. Read more
Source§

impl<TArray> BitOr for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: BitOr<Output = <Self as Vector>::Element>,

Source§

type Output = Simd<TArray>

The resulting type after applying the | operator.
Source§

fn bitor(self, other: Self) -> Self

Performs the | operation. Read more
Source§

impl<TArray> BitXor for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: BitXor<Output = <Self as Vector>::Element>,

Source§

type Output = Simd<TArray>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, other: Self) -> Self

Performs the ^ operation. Read more
Source§

impl<TArray: Clone> Clone for Simd<TArray>
where Self: Vector,

Source§

fn clone(&self) -> Simd<TArray>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<TArray> Debug for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: Debug,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<TArray> Default for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: Default,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<TArray> Deref for Simd<TArray>
where Self: Vector,

Source§

type Target = TArray

The resulting type after dereferencing.
Source§

fn deref(&self) -> &TArray

Dereferences the value.
Source§

impl<TArray> DerefMut for Simd<TArray>
where Self: Vector,

Source§

fn deref_mut(&mut self) -> &mut TArray

Mutably dereferences the value.
Source§

impl<TArray> Div for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: Div<Output = <Self as Vector>::Element> + FloatingPoint,

Source§

type Output = Simd<TArray>

The resulting type after applying the / operator.
Source§

fn div(self, other: Self) -> Self

Performs the / operation. Read more
Source§

impl From<Simd<[f32; 16]>> for [f32; 16]

Source§

fn from(simd: Simd<[f32; 16]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[f32; 2]>> for [f32; 2]

Source§

fn from(simd: Simd<[f32; 2]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[f32; 4]>> for [f32; 4]

Source§

fn from(simd: Simd<[f32; 4]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[f32; 8]>> for [f32; 8]

Source§

fn from(simd: Simd<[f32; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[f64; 1]>> for [f64; 1]

Source§

fn from(simd: Simd<[f64; 1]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[f64; 2]>> for [f64; 2]

Source§

fn from(simd: Simd<[f64; 2]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[f64; 4]>> for [f64; 4]

Source§

fn from(simd: Simd<[f64; 4]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[f64; 8]>> for [f64; 8]

Source§

fn from(simd: Simd<[f64; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i16; 16]>> for [i16; 16]

Source§

fn from(simd: Simd<[i16; 16]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i16; 32]>> for [i16; 32]

Source§

fn from(simd: Simd<[i16; 32]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i16; 4]>> for [i16; 4]

Source§

fn from(simd: Simd<[i16; 4]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i16; 8]>> for [i16; 8]

Source§

fn from(simd: Simd<[i16; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i32; 16]>> for [i32; 16]

Source§

fn from(simd: Simd<[i32; 16]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i32; 2]>> for [i32; 2]

Source§

fn from(simd: Simd<[i32; 2]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i32; 4]>> for [i32; 4]

Source§

fn from(simd: Simd<[i32; 4]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i32; 8]>> for [i32; 8]

Source§

fn from(simd: Simd<[i32; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i64; 1]>> for [i64; 1]

Source§

fn from(simd: Simd<[i64; 1]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i64; 2]>> for [i64; 2]

Source§

fn from(simd: Simd<[i64; 2]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i64; 4]>> for [i64; 4]

Source§

fn from(simd: Simd<[i64; 4]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i64; 8]>> for [i64; 8]

Source§

fn from(simd: Simd<[i64; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i8; 16]>> for [i8; 16]

Source§

fn from(simd: Simd<[i8; 16]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i8; 32]>> for [i8; 32]

Source§

fn from(simd: Simd<[i8; 32]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i8; 64]>> for [i8; 64]

Source§

fn from(simd: Simd<[i8; 64]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[i8; 8]>> for [i8; 8]

Source§

fn from(simd: Simd<[i8; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m16; 16]>> for [m16; 16]

Source§

fn from(simd: Simd<[m16; 16]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m16; 16]>> for u16x16

Source§

fn from(mask: m16x16) -> u16x16

Converts to this type from the input type.
Source§

impl From<Simd<[m16; 32]>> for [m16; 32]

Source§

fn from(simd: Simd<[m16; 32]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m16; 32]>> for u16x32

Source§

fn from(mask: m16x32) -> u16x32

Converts to this type from the input type.
Source§

impl From<Simd<[m16; 4]>> for [m16; 4]

Source§

fn from(simd: Simd<[m16; 4]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m16; 4]>> for u16x4

Source§

fn from(mask: m16x4) -> u16x4

Converts to this type from the input type.
Source§

impl From<Simd<[m16; 8]>> for [m16; 8]

Source§

fn from(simd: Simd<[m16; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m16; 8]>> for u16x8

Source§

fn from(mask: m16x8) -> u16x8

Converts to this type from the input type.
Source§

impl From<Simd<[m32; 16]>> for [m32; 16]

Source§

fn from(simd: Simd<[m32; 16]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m32; 16]>> for u32x16

Source§

fn from(mask: m32x16) -> u32x16

Converts to this type from the input type.
Source§

impl From<Simd<[m32; 2]>> for [m32; 2]

Source§

fn from(simd: Simd<[m32; 2]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m32; 2]>> for u32x2

Source§

fn from(mask: m32x2) -> u32x2

Converts to this type from the input type.
Source§

impl From<Simd<[m32; 4]>> for [m32; 4]

Source§

fn from(simd: Simd<[m32; 4]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m32; 4]>> for u32x4

Source§

fn from(mask: m32x4) -> u32x4

Converts to this type from the input type.
Source§

impl From<Simd<[m32; 8]>> for [m32; 8]

Source§

fn from(simd: Simd<[m32; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m32; 8]>> for u32x8

Source§

fn from(mask: m32x8) -> u32x8

Converts to this type from the input type.
Source§

impl From<Simd<[m64; 1]>> for [m64; 1]

Source§

fn from(simd: Simd<[m64; 1]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m64; 1]>> for u64x1

Source§

fn from(mask: m64x1) -> u64x1

Converts to this type from the input type.
Source§

impl From<Simd<[m64; 2]>> for [m64; 2]

Source§

fn from(simd: Simd<[m64; 2]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m64; 2]>> for u64x2

Source§

fn from(mask: m64x2) -> u64x2

Converts to this type from the input type.
Source§

impl From<Simd<[m64; 4]>> for [m64; 4]

Source§

fn from(simd: Simd<[m64; 4]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m64; 4]>> for u64x4

Source§

fn from(mask: m64x4) -> u64x4

Converts to this type from the input type.
Source§

impl From<Simd<[m64; 8]>> for [m64; 8]

Source§

fn from(simd: Simd<[m64; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m64; 8]>> for u64x8

Source§

fn from(mask: m64x8) -> u64x8

Converts to this type from the input type.
Source§

impl From<Simd<[m8; 16]>> for [m8; 16]

Source§

fn from(simd: Simd<[m8; 16]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m8; 16]>> for u8x16

Source§

fn from(mask: m8x16) -> u8x16

Converts to this type from the input type.
Source§

impl From<Simd<[m8; 32]>> for [m8; 32]

Source§

fn from(simd: Simd<[m8; 32]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m8; 32]>> for u8x32

Source§

fn from(mask: m8x32) -> u8x32

Converts to this type from the input type.
Source§

impl From<Simd<[m8; 64]>> for [m8; 64]

Source§

fn from(simd: Simd<[m8; 64]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m8; 64]>> for u8x64

Source§

fn from(mask: m8x64) -> u8x64

Converts to this type from the input type.
Source§

impl From<Simd<[m8; 8]>> for [m8; 8]

Source§

fn from(simd: Simd<[m8; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[m8; 8]>> for u8x8

Source§

fn from(mask: m8x8) -> u8x8

Converts to this type from the input type.
Source§

impl From<Simd<[u16; 16]>> for [u16; 16]

Source§

fn from(simd: Simd<[u16; 16]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u16; 32]>> for [u16; 32]

Source§

fn from(simd: Simd<[u16; 32]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u16; 4]>> for [u16; 4]

Source§

fn from(simd: Simd<[u16; 4]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u16; 8]>> for [u16; 8]

Source§

fn from(simd: Simd<[u16; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u32; 16]>> for [u32; 16]

Source§

fn from(simd: Simd<[u32; 16]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u32; 2]>> for [u32; 2]

Source§

fn from(simd: Simd<[u32; 2]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u32; 4]>> for [u32; 4]

Source§

fn from(simd: Simd<[u32; 4]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u32; 8]>> for [u32; 8]

Source§

fn from(simd: Simd<[u32; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u64; 1]>> for [u64; 1]

Source§

fn from(simd: Simd<[u64; 1]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u64; 2]>> for [u64; 2]

Source§

fn from(simd: Simd<[u64; 2]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u64; 4]>> for [u64; 4]

Source§

fn from(simd: Simd<[u64; 4]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u64; 8]>> for [u64; 8]

Source§

fn from(simd: Simd<[u64; 8]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u8; 16]>> for [u8; 16]

Source§

fn from(simd: Simd<[u8; 16]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u8; 32]>> for [u8; 32]

Source§

fn from(simd: Simd<[u8; 32]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u8; 64]>> for [u8; 64]

Source§

fn from(simd: Simd<[u8; 64]>) -> Self

Converts to this type from the input type.
Source§

impl From<Simd<[u8; 8]>> for [u8; 8]

Source§

fn from(simd: Simd<[u8; 8]>) -> Self

Converts to this type from the input type.
Source§

impl<TArray> From<TArray> for Simd<TArray>
where Self: Vector,

Source§

fn from(array: TArray) -> Self

Converts to this type from the input type.
Source§

impl<TArray> Mul for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: Mul<Output = <Self as Vector>::Element> + FloatingPoint,

Source§

type Output = Simd<TArray>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Self) -> Self

Performs the * operation. Read more
Source§

impl<TArray> Neg for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: Neg<Output = <Self as Vector>::Element> + FloatingPoint,

Source§

type Output = Simd<TArray>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl<TArray> Not for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: Not<Output = <Self as Vector>::Element>,

Source§

type Output = Simd<TArray>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self

Performs the unary ! operation. Read more
Source§

impl<TArray> Rem for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: Rem<Output = <Self as Vector>::Element> + FloatingPoint,

Source§

type Output = Simd<TArray>

The resulting type after applying the % operator.
Source§

fn rem(self, other: Self) -> Self

Performs the % operation. Read more
Source§

impl<TArray> Sub for Simd<TArray>
where Self: SimdImpl, <Self as Vector>::Element: Sub<Output = <Self as Vector>::Element> + FloatingPoint,

Source§

type Output = Simd<TArray>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Self) -> Self

Performs the - operation. Read more
Source§

impl Vector for Simd<[f32; 16]>

Source§

impl Vector for Simd<[f32; 2]>

Source§

impl Vector for Simd<[f32; 4]>

Source§

impl Vector for Simd<[f32; 8]>

Source§

impl Vector for Simd<[f64; 1]>

Source§

impl Vector for Simd<[f64; 2]>

Source§

impl Vector for Simd<[f64; 4]>

Source§

impl Vector for Simd<[f64; 8]>

Source§

impl Vector for Simd<[i16; 16]>

Source§

impl Vector for Simd<[i16; 32]>

Source§

impl Vector for Simd<[i16; 4]>

Source§

impl Vector for Simd<[i16; 8]>

Source§

impl Vector for Simd<[i32; 16]>

Source§

impl Vector for Simd<[i32; 2]>

Source§

impl Vector for Simd<[i32; 4]>

Source§

impl Vector for Simd<[i32; 8]>

Source§

impl Vector for Simd<[i64; 1]>

Source§

impl Vector for Simd<[i64; 2]>

Source§

impl Vector for Simd<[i64; 4]>

Source§

impl Vector for Simd<[i64; 8]>

Source§

impl Vector for Simd<[i8; 16]>

Source§

impl Vector for Simd<[i8; 32]>

Source§

impl Vector for Simd<[i8; 64]>

Source§

impl Vector for Simd<[i8; 8]>

Source§

impl Vector for Simd<[m16; 16]>

Source§

impl Vector for Simd<[m16; 32]>

Source§

impl Vector for Simd<[m16; 4]>

Source§

impl Vector for Simd<[m16; 8]>

Source§

impl Vector for Simd<[m32; 16]>

Source§

impl Vector for Simd<[m32; 2]>

Source§

impl Vector for Simd<[m32; 4]>

Source§

impl Vector for Simd<[m32; 8]>

Source§

impl Vector for Simd<[m64; 1]>

Source§

impl Vector for Simd<[m64; 2]>

Source§

impl Vector for Simd<[m64; 4]>

Source§

impl Vector for Simd<[m64; 8]>

Source§

impl Vector for Simd<[m8; 16]>

Source§

impl Vector for Simd<[m8; 32]>

Source§

impl Vector for Simd<[m8; 64]>

Source§

impl Vector for Simd<[m8; 8]>

Source§

impl Vector for Simd<[u16; 16]>

Source§

impl Vector for Simd<[u16; 32]>

Source§

impl Vector for Simd<[u16; 4]>

Source§

impl Vector for Simd<[u16; 8]>

Source§

impl Vector for Simd<[u32; 16]>

Source§

impl Vector for Simd<[u32; 2]>

Source§

impl Vector for Simd<[u32; 4]>

Source§

impl Vector for Simd<[u32; 8]>

Source§

impl Vector for Simd<[u64; 1]>

Source§

impl Vector for Simd<[u64; 2]>

Source§

impl Vector for Simd<[u64; 4]>

Source§

impl Vector for Simd<[u64; 8]>

Source§

impl Vector for Simd<[u8; 16]>

Source§

impl Vector for Simd<[u8; 32]>

Source§

impl Vector for Simd<[u8; 64]>

Source§

impl Vector for Simd<[u8; 8]>

Source§

impl<TArray: Copy> Copy for Simd<TArray>
where Self: Vector,

Auto Trait Implementations§

§

impl<TArray> !Freeze for Simd<TArray>

§

impl<TArray> !RefUnwindSafe for Simd<TArray>

§

impl<TArray> !Send for Simd<TArray>

§

impl<TArray> !Sync for Simd<TArray>

§

impl<TArray> !Unpin for Simd<TArray>

§

impl<TArray> !UnwindSafe for Simd<TArray>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

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

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.