Skip to main content

Lane4_i32Example

Struct Lane4_i32Example 

Source
pub struct Lane4_i32Example<T>(pub [T; 4]);
Available on crate feature _docs_examples only.
Expand description

Tuple Fields§

§0: [T; 4]

Implementations§

Source§

impl Lane4_i32Example<i32>

§Common methods for all integers and floating-point primitives.

Source

pub const fn from_byte_values(bytes: &[u8]) -> Self

Builds a lane pack from the first 4 bytes of a byte slice.

§Panics

Panics if bytes.len() < 4.

Source

pub const fn from_slice(slice: &[i32]) -> Self

Builds a lane pack from the first 4 elements of a slice.

§Panics

Panics if slice.len() < 4.

Source

pub const fn splat(v: i32) -> Self

Fills all lanes with the same value.

Source

pub fn add_assign(&mut self, rhs: Self)

Adds each lane of rhs to the corresponding lane in self.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn add_assign_plain(&mut self, rhs: Self)

Adds each lane of rhs to the corresponding lane in self.

§Panics

Panics on integer overflow (debug and const only).

Source

pub fn add_assign_simd(&mut self, rhs: Self)

Available on nightly_simd only.

Adds each lane of rhs to the corresponding lane in self using SIMD.

Performs elementwise addition with the semantics of the underlying element type.

Integer addition wraps on overflow; floating-point follows IEEE-754 rules.

Source

pub fn add_assign_wide(&mut self, rhs: Self)

Available on crate feature dep_wide only.

Adds each lane of rhs to the corresponding lane in self using SIMD.

Performs elementwise addition with the semantics of the underlying element type.

Integer addition wraps on overflow; floating-point follows IEEE-754 rules.

Source

pub fn sub_assign(&mut self, rhs: Self)

Subtracts each lane of rhs from the corresponding lane in self.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn sub_assign_plain(&mut self, rhs: Self)

Subtracts each lane of rhs from the corresponding lane in self.

§Panics

Panics on integer overflow (debug and const only).

Source

pub fn sub_assign_simd(&mut self, rhs: Self)

Available on nightly_simd only.

Subtracts each lane of rhs from the corresponding lane in self using SIMD.

Performs elementwise subtraction with the semantics of the underlying element type.

Integer subtraction wraps on overflow; floating-point follows IEEE-754 rules.

Source

pub fn sub_assign_wide(&mut self, rhs: Self)

Available on crate feature dep_wide only.

Subtracts each lane of rhs from the corresponding lane in self using SIMD.

Performs elementwise subtraction with the semantics of the underlying element type.

Integer subtraction wraps on overflow; floating-point follows IEEE-754 rules.

Source

pub fn mul_assign(&mut self, rhs: Self)

Multiplies each lane of self by the corresponding lane of rhs.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn mul_assign_plain(&mut self, rhs: Self)

Multiplies each lane of self by the corresponding lane of rhs.

§Panics

Panics on integer overflow (debug and const only).

Source

pub fn mul_assign_simd(&mut self, rhs: Self)

Available on nightly_simd only.

Multiplies each lane of self by the corresponding lane of rhs using SIMD.

Performs elementwise multiplication with the semantics of the underlying element type.

Integer multiplication wraps on overflow; floating-point follows IEEE-754 rules.

Source

pub fn mul_assign_wide(&mut self, rhs: Self)

Available on crate feature dep_wide only.

Multiplies each lane of self by the corresponding lane of rhs using SIMD.

Performs elementwise multiplication with the semantics of the underlying element type.

Integer multiplication wraps on overflow; floating-point follows IEEE-754 rules.

Source

pub fn rem_assign(&mut self, rhs: Self)

Applies elementwise modular reduction.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn rem_assign_plain(&mut self, rhs: Self)

Applies elementwise modular reduction.

§Panics

Panics if any divisor is zero.

Source

pub const fn div_assign_plain(&mut self, rhs: Self)

Divides each lane by the corresponding lane in rhs (truncating division).

§Panics

Panics if any divisor is zero or on signed integer overflow.

Source

pub fn div_assign_simd(&mut self, rhs: Self)

Available on nightly_simd only.

Divides each lane of self by the corresponding lane of rhs using SIMD.

Applies elementwise division following IEEE-754 semantics. Not available for integer types.

Source

pub fn neg_assign(&mut self)

Negates each lane in place.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub fn add_scalar_assign(&mut self, rhs: i32)

Adds the scalar rhs to each lane in self.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn add_scalar_assign_plain(&mut self, rhs: i32)

Adds the scalar rhs to each lane in self.

§Panics

Panics on integer overflow (debug and const only).

Source

pub fn sub_scalar_assign(&mut self, rhs: i32)

Subtracts the scalar rhs from each lane in self.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn sub_scalar_assign_plain(&mut self, rhs: i32)

Subtracts the scalar rhs from each lane in self.

§Panics

Panics on integer overflow (debug and const only).

Source

pub fn mul_scalar_assign(&mut self, rhs: i32)

Multiplies each lane by the scalar rhs.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn mul_scalar_assign_plain(&mut self, rhs: i32)

Multiplies each lane by the scalar rhs.

§Panics

Panics on integer overflow (debug and const only).

Source

pub fn rem_scalar_assign(&mut self, rhs: i32)

Applies scalar modular reduction to each lane.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn rem_scalar_assign_plain(&mut self, rhs: i32)

Applies scalar modular reduction to each lane.

§Panics

Panics if rhs == 0.

Source

pub fn div_scalar_assign(&mut self, rhs: i32)

Divides each lane by the scalar rhs (truncating division).

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn div_scalar_assign_plain(&mut self, rhs: i32)

Divides each lane by the scalar rhs (truncating division).

§Panics

Panics if rhs == 0 or on signed integer overflow.

Source

pub fn min(&mut self, rhs: Self)

Returns the minimum lane value.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn min_plain(&mut self, rhs: Self)

Returns the minimum lane value.

Source

pub fn min_wide(&mut self, rhs: Self)

Available on crate feature dep_wide only.

Returns the minimum value across all lanes using SIMD acceleration.

Follows the comparison semantics of the underlying element type.

Source

pub fn max(&mut self, rhs: Self)

Returns the maximum lane value.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn max_plain(&mut self, rhs: Self)

Returns the maximum lane value.

Source

pub fn max_wide(&mut self, rhs: Self)

Available on crate feature dep_wide only.

Returns the maximum value across all lanes using SIMD acceleration.

Follows the comparison semantics of the underlying element type.

Source

pub fn clamp_assign(&mut self, lo: i32, hi: i32)

Clamps each lane to the inclusive [lo, hi] range.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn clamp_assign_plain(&mut self, lo: i32, hi: i32)

Clamps each lane to the inclusive [lo, hi] range.

Source

pub const fn min_reduce_plain(&self) -> i32

Returns the horizontal minimum of all lanes.

Source

pub const fn max_reduce_plain(&self) -> i32

Returns the horizontal maximum of all lanes.

Source

pub fn sum(&mut self)

Returns the sum of all lanes.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn sum_plain(&self) -> i32

Returns the sum of all lanes.

Source§

impl Lane4_i32Example<i32>

§Methods for integer primitives.

Source

pub fn div_assign(&mut self, rhs: Self)

Divides each lane by the corresponding lane in rhs (truncating division).

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn neg_assign_plain(&mut self)

Negates each lane in place.

§Panics

Panics on integer overflow (debug and const only).

For signed integers, overflow occurs when the value is the minimum representable integer. Unsigned integers wrap according to two’s complement semantics.

Source

pub const fn saturating_add_assign_plain(&mut self, rhs: Self)

Adds each lane of rhs to the corresponding lane in self, saturating on overflow.

Source

pub const fn wrapping_add_assign_plain(&mut self, rhs: Self)

Adds each lane of rhs to the corresponding lane in self, wrapping on overflow.

Source

pub const fn saturating_sub_assign_plain(&mut self, rhs: Self)

Subtracts each lane of rhs from the corresponding lane in self, saturating on overflow.

Source

pub const fn wrapping_sub_assign_plain(&mut self, rhs: Self)

Subtracts each lane of rhs from the corresponding lane in self, wrapping on overflow.

Source

pub const fn wrapping_mul_assign_plain(&mut self, rhs: Self)

Multiplies each lane of rhs by the corresponding lane in self, wrapping on overflow.

Source

pub fn bitand_assign(&mut self, rhs: Self)

Bitwise AND each lane with the corresponding lane in rhs.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn bitand_assign_plain(&mut self, rhs: Self)

Bitwise AND each lane with the corresponding lane in rhs.

Source

pub fn bitand_assign_simd(&mut self, rhs: Self)

Available on nightly_simd only.

Applies a bitwise AND between each lane of self and rhs using SIMD.

Source

pub fn bitand_assign_wide(&mut self, rhs: Self)

Available on crate feature dep_wide only.

Applies a bitwise AND between each lane of self and rhs using SIMD.

Source

pub fn bitor_assign(&mut self, rhs: Self)

Bitwise OR each lane with the corresponding lane in rhs.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn bitor_assign_plain(&mut self, rhs: Self)

Bitwise OR each lane with the corresponding lane in rhs.

Source

pub fn bitor_assign_simd(&mut self, rhs: Self)

Available on nightly_simd only.

Applies a bitwise OR between each lane of self and rhs using SIMD.

Source

pub fn bitor_assign_wide(&mut self, rhs: Self)

Available on crate feature dep_wide only.

Applies a bitwise OR between each lane of self and rhs using SIMD.

Source

pub fn bitxor_assign(&mut self, rhs: Self)

Bitwise XOR each lane with the corresponding lane in rhs.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn bitxor_assign_plain(&mut self, rhs: Self)

Bitwise XOR each lane with the corresponding lane in rhs.

Source

pub fn bitxor_assign_simd(&mut self, rhs: Self)

Available on nightly_simd only.

Applies a bitwise XOR between each lane of self and rhs using SIMD.

Source

pub fn bitxor_assign_wide(&mut self, rhs: Self)

Available on crate feature dep_wide only.

Applies a bitwise XOR between each lane of self and rhs using SIMD.

Source

pub fn shl_assign(&mut self, n: i32)

Shifts each lane left by n.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn shl_assign_plain(&mut self, n: i32)

Shifts each lane left by n.

Source

pub fn shl_assign_simd(&mut self, n: i32)

Available on nightly_simd only.

Shifts each lane in self left by the scalar amount rhs using SIMD.

Uses the shift semantics of the underlying integer type.

Source

pub fn shl_assign_wide(&mut self, n: i32)

Available on crate feature dep_wide only.

Shifts each lane in self left by the scalar amount rhs using SIMD.

Uses the shift semantics of the underlying integer type.

Source

pub fn shr_assign(&mut self, n: i32)

Shifts each lane right by n.

This method is a thin wrapper over the best available alternative (simd→wide→plain)

Source

pub const fn shr_assign_plain(&mut self, n: i32)

Shifts each lane right by n.

Performs an arithmetic right shift for signed integers, and a logical right shift for unsigned integers.

Source

pub fn shr_assign_simd(&mut self, n: i32)

Available on nightly_simd only.

Shifts each lane in self right by the scalar amount rhs using SIMD.

Applies arithmetic right shift for signed integers and logical right shift for unsigned integers.

Source

pub fn shr_assign_wide(&mut self, n: i32)

Available on crate feature dep_wide only.

Shifts each lane in self right by the scalar amount rhs using SIMD.

Applies arithmetic right shift for signed integers and logical right shift for unsigned integers.

Source

pub fn min_simd(&mut self, rhs: Self)

Available on nightly_simd only.

Returns the minimum value across all lanes using SIMD acceleration.

Follows the comparison semantics of the underlying element type.

Source

pub fn max_simd(&mut self, rhs: Self)

Available on nightly_simd only.

Returns the maximum value across all lanes using SIMD acceleration.

Follows the comparison semantics of the underlying element type.

Trait Implementations§

Source§

impl AddAssign for Lane4_i32Example<i32>

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl AddAssign<i32> for Lane4_i32Example<i32>

Source§

fn add_assign(&mut self, rhs: i32)

Performs the += operation. Read more
Source§

impl<T: Clone> Clone for Lane4_i32Example<T>

Source§

fn clone(&self) -> Lane4_i32Example<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<T: ConstInit> ConstInit for Lane4_i32Example<T>

Source§

const INIT: Self

Returns the compile-time “initial value” for a type.
Source§

impl<T: Copy> Copy for Lane4_i32Example<T>

Source§

impl<T: Debug> Debug for Lane4_i32Example<T>

Source§

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

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

impl MulAssign for Lane4_i32Example<i32>

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl MulAssign<i32> for Lane4_i32Example<i32>

Source§

fn mul_assign(&mut self, rhs: i32)

Performs the *= operation. Read more
Source§

impl<T: PartialEq> PartialEq for Lane4_i32Example<T>

Source§

fn eq(&self, other: &Lane4_i32Example<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl RemAssign for Lane4_i32Example<i32>

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl RemAssign<i32> for Lane4_i32Example<i32>

Source§

fn rem_assign(&mut self, rhs: i32)

Performs the %= operation. Read more
Source§

impl<T> StructuralPartialEq for Lane4_i32Example<T>

Source§

impl SubAssign for Lane4_i32Example<i32>

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl SubAssign<i32> for Lane4_i32Example<i32>

Source§

fn sub_assign(&mut self, rhs: i32)

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Lane4_i32Example<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Lane4_i32Example<T>
where T: RefUnwindSafe,

§

impl<T> Send for Lane4_i32Example<T>
where T: Send,

§

impl<T> Sync for Lane4_i32Example<T>
where T: Sync,

§

impl<T> Unpin for Lane4_i32Example<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Lane4_i32Example<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for Lane4_i32Example<T>
where T: UnwindSafe,

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> AnyExt for T
where T: Any + ?Sized,

Source§

fn type_id() -> TypeId

Returns the TypeId of Self. Read more
Source§

fn type_of(&self) -> TypeId

Returns the TypeId of self. Read more
Source§

fn type_name(&self) -> &'static str

Returns the type name of self. Read more
Source§

fn type_is<T: 'static>(&self) -> bool

Returns true if Self is of type T. Read more
Source§

fn type_hash(&self) -> u64

Returns a deterministic hash of the TypeId of Self.
Source§

fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64

Returns a deterministic hash of the TypeId of Self using a custom hasher.
Source§

fn as_any_ref(&self) -> &dyn Any
where Self: Sized,

Upcasts &self as &dyn Any. Read more
Source§

fn as_any_mut(&mut self) -> &mut dyn Any
where Self: Sized,

Upcasts &mut self as &mut dyn Any. Read more
Source§

fn as_any_box(self: Box<Self>) -> Box<dyn Any>
where Self: Sized,

Available on crate feature alloc only.
Upcasts Box<self> as Box<dyn Any>. Read more
Source§

fn downcast_ref<T: 'static>(&self) -> Option<&T>

Available on crate feature unsafe_layout and non-crate feature safe_code only.
Returns some shared reference to the inner value if it is of type T. Read more
Source§

fn downcast_mut<T: 'static>(&mut self) -> Option<&mut T>

Available on crate feature unsafe_layout and non-crate feature safe_code only.
Returns some exclusive reference to the inner value if it is of type T. 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> ByteSized for T

Source§

const BYTE_ALIGN: usize = _

The alignment of this type in bytes.
Source§

const BYTE_SIZE: usize = _

The size of this type in bytes.
Source§

fn byte_align(&self) -> usize

Returns the alignment of this type in bytes.
Source§

fn byte_size(&self) -> usize

Returns the size of this type in bytes. Read more
Source§

fn ptr_size_ratio(&self) -> [usize; 2]

Returns the size ratio between Ptr::BYTES and BYTE_SIZE. 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> Hook for T

Source§

fn hook<F>(self, f: F) -> Self
where F: FnOnce(&mut Self),

Hooks a mutation step into the value and returns it. Read more
Source§

fn tap<F>(self, f: F) -> Self
where F: FnOnce(&Self),

Taps into the value for observation and returns it unchanged. Read more
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<T> MemExt for T
where T: ?Sized,

Source§

const NEEDS_DROP: bool = _

Know whether dropping values of this type matters, in compile-time.
Source§

fn mem_align_of<T>() -> usize

Returns the minimum alignment of the type in bytes. Read more
Source§

fn mem_align_of_val(&self) -> usize

Returns the alignment of the pointed-to value in bytes. Read more
Source§

fn mem_size_of<T>() -> usize

Returns the size of a type in bytes. Read more
Source§

fn mem_size_of_val(&self) -> usize

Returns the size of the pointed-to value in bytes. Read more
Source§

fn mem_copy(&self) -> Self
where Self: Copy,

Bitwise-copies a value. Read more
Source§

fn mem_needs_drop(&self) -> bool

Returns true if dropping values of this type matters. Read more
Source§

fn mem_drop(self)
where Self: Sized,

Drops self by running its destructor. Read more
Source§

fn mem_forget(self)
where Self: Sized,

Forgets about self without running its destructor. Read more
Source§

fn mem_replace(&mut self, other: Self) -> Self
where Self: Sized,

Replaces self with other, returning the previous value of self. Read more
Source§

fn mem_take(&mut self) -> Self
where Self: Default,

Replaces self with its default value, returning the previous value of self. Read more
Source§

fn mem_swap(&mut self, other: &mut Self)
where Self: Sized,

Swaps the value of self and other without deinitializing either one. Read more
Source§

unsafe fn mem_zeroed<T>() -> T

Available on crate feature unsafe_layout only.
Returns the value of type T represented by the all-zero byte-pattern. Read more
Source§

unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst

Available on crate feature unsafe_layout only.
Returns the value of type T represented by the all-zero byte-pattern. Read more
Source§

fn mem_as_bytes(&self) -> &[u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &[u8]. Read more
Source§

fn mem_as_bytes_mut(&mut self) -> &mut [u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &mut [u8]. Read more
Source§

impl<T, R> Morph<R> for T
where T: ?Sized,

Source§

fn morph<F>(self, f: F) -> R
where F: FnOnce(Self) -> R, Self: Sized,

Morphs the value into a new one and returns it. Read more
Source§

fn morph_ref<F>(&self, f: F) -> R
where F: FnOnce(&Self) -> R,

Morphs the value by shared reference and returns the result. Read more
Source§

fn morph_mut<F>(&mut self, f: F) -> R
where F: FnOnce(&mut Self) -> R,

Morphs the value by exclusive reference and returns the result. Read more
Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.