Struct safe_arch::m128i

source ·
#[repr(transparent)]
pub struct m128i(pub __m128i);
Expand description

The data for a 128-bit SSE register of integer data.

  • The exact layout to view the type as depends on the operation used.
  • From and Into impls are provided for all the relevant signed integer array types.
  • Formatting impls print as four i32 values just because they have to pick something. If you want an alternative you can turn it into an array and print as you like.

Tuple Fields§

§0: __m128i

Trait Implementations§

source§

impl Binary for m128i

source§

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

Binary formats each i32.

let f = format!("{:b}", m128i::default());
assert_eq!(&f, "(0, 0, 0, 0)");
source§

impl BitAnd<m128i> for m128i

§

type Output = m128i

The resulting type after applying the & operator.
source§

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

Performs the & operation. Read more
source§

impl BitAndAssign<m128i> for m128i

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl BitOr<m128i> for m128i

§

type Output = m128i

The resulting type after applying the | operator.
source§

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

Performs the | operation. Read more
source§

impl BitOrAssign<m128i> for m128i

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl BitXor<m128i> for m128i

§

type Output = m128i

The resulting type after applying the ^ operator.
source§

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

Performs the ^ operation. Read more
source§

impl BitXorAssign<m128i> for m128i

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl Clone for m128i

source§

fn clone(&self) -> Self

Returns a copy 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 Debug for m128i

source§

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

Debug formats each i32.

let f = format!("{:?}", m128i::default());
assert_eq!(&f, "m128i(0, 0, 0, 0)");
source§

impl Default for m128i

source§

fn default() -> Self

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

impl Display for m128i

source§

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

Display formats each i32, and leaves the type name off of the font.

let f = format!("{}", m128i::default());
assert_eq!(&f, "(0, 0, 0, 0)");
source§

impl From<[i16; 8]> for m128i

source§

fn from(arr: [i16; 8]) -> Self

Converts to this type from the input type.
source§

impl From<[i32; 4]> for m128i

source§

fn from(arr: [i32; 4]) -> Self

Converts to this type from the input type.
source§

impl From<[i64; 2]> for m128i

source§

fn from(arr: [i64; 2]) -> Self

Converts to this type from the input type.
source§

impl From<[i8; 16]> for m128i

source§

fn from(arr: [i8; 16]) -> Self

Converts to this type from the input type.
source§

impl From<[u16; 8]> for m128i

source§

fn from(arr: [u16; 8]) -> Self

Converts to this type from the input type.
source§

impl From<[u32; 4]> for m128i

source§

fn from(arr: [u32; 4]) -> Self

Converts to this type from the input type.
source§

impl From<[u64; 2]> for m128i

source§

fn from(arr: [u64; 2]) -> Self

Converts to this type from the input type.
source§

impl From<[u8; 16]> for m128i

source§

fn from(arr: [u8; 16]) -> Self

Converts to this type from the input type.
source§

impl From<i128> for m128i

source§

fn from(i: i128) -> Self

Converts to this type from the input type.
source§

impl From<m128i> for [i16; 8]

source§

fn from(m: m128i) -> Self

Converts to this type from the input type.
source§

impl From<m128i> for [i32; 4]

source§

fn from(m: m128i) -> Self

Converts to this type from the input type.
source§

impl From<m128i> for [i64; 2]

source§

fn from(m: m128i) -> Self

Converts to this type from the input type.
source§

impl From<m128i> for [i8; 16]

source§

fn from(m: m128i) -> Self

Converts to this type from the input type.
source§

impl From<m128i> for [u16; 8]

source§

fn from(m: m128i) -> Self

Converts to this type from the input type.
source§

impl From<m128i> for [u32; 4]

source§

fn from(m: m128i) -> Self

Converts to this type from the input type.
source§

impl From<m128i> for [u64; 2]

source§

fn from(m: m128i) -> Self

Converts to this type from the input type.
source§

impl From<m128i> for [u8; 16]

source§

fn from(m: m128i) -> Self

Converts to this type from the input type.
source§

impl From<m128i> for i128

source§

fn from(m: m128i) -> Self

Converts to this type from the input type.
source§

impl From<m128i> for u128

source§

fn from(m: m128i) -> Self

Converts to this type from the input type.
source§

impl From<u128> for m128i

source§

fn from(u: u128) -> Self

Converts to this type from the input type.
source§

impl LowerExp for m128i

source§

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

LowerExp formats each i32.

let f = format!("{:e}", m128i::default());
assert_eq!(&f, "(0e0, 0e0, 0e0, 0e0)");
source§

impl LowerHex for m128i

source§

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

LowerHex formats each i32.

let f = format!("{:x}", m128i::default());
assert_eq!(&f, "(0, 0, 0, 0)");
source§

impl Not for m128i

source§

fn not(self) -> Self

Not a direct intrinsic, but it’s very useful and the implementation is simple enough.

Negates the bits by performing an xor with an all-1s bit pattern.

§

type Output = m128i

The resulting type after applying the ! operator.
source§

impl Octal for m128i

source§

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

Octal formats each i32.

let f = format!("{:o}", m128i::default());
assert_eq!(&f, "(0, 0, 0, 0)");
source§

impl PartialEq<m128i> for m128i

source§

fn eq(&self, other: &Self) -> bool

Not a direct intrinsic, this is a cmp_eq_mask_i8_m128i and then a move_mask_i8_m128i.

1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TransparentWrapper<__m128i> for m128i

source§

fn wrap(s: Inner) -> Selfwhere Self: Sized,

Convert the inner type into the wrapper type.
source§

fn wrap_ref(s: &Inner) -> &Self

Convert a reference to the inner type into a reference to the wrapper type.
source§

fn wrap_mut(s: &mut Inner) -> &mut Self

Convert a mutable reference to the inner type into a mutable reference to the wrapper type.
source§

fn wrap_slice(s: &[Inner]) -> &[Self]where Self: Sized,

Convert a slice to the inner type into a slice to the wrapper type.
source§

fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where Self: Sized,

Convert a mutable slice to the inner type into a mutable slice to the wrapper type.
source§

fn peel(s: Self) -> Innerwhere Self: Sized,

Convert the wrapper type into the inner type.
source§

fn peel_ref(s: &Self) -> &Inner

Convert a reference to the wrapper type into a reference to the inner type.
source§

fn peel_mut(s: &mut Self) -> &mut Inner

Convert a mutable reference to the wrapper type into a mutable reference to the inner type.
source§

fn peel_slice(s: &[Self]) -> &[Inner]where Self: Sized,

Convert a slice to the wrapped type into a slice to the inner type.
source§

fn peel_slice_mut(s: &mut [Self]) -> &mut [Inner]where Self: Sized,

Convert a mutable slice to the wrapped type into a mutable slice to the inner type.
source§

impl UpperExp for m128i

source§

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

UpperExp formats each i32.

let f = format!("{:E}", m128i::default());
assert_eq!(&f, "(0E0, 0E0, 0E0, 0E0)");
source§

impl UpperHex for m128i

source§

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

UpperHex formats each i32.

let f = format!("{:X}", m128i::default());
assert_eq!(&f, "(0, 0, 0, 0)");
source§

impl Zeroable for m128i

source§

fn zeroed() -> Self

source§

impl Copy for m128i

source§

impl Eq for m128i

Unlike with the floating types, ints have absolute equality.

source§

impl Pod for m128i

Auto Trait Implementations§

§

impl RefUnwindSafe for m128i

§

impl Send for m128i

§

impl Sync for m128i

§

impl Unpin for m128i

§

impl UnwindSafe for m128i

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> CheckedBitPattern for Twhere T: AnyBitPattern,

§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
source§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<T> AnyBitPattern for Twhere T: Pod,

source§

impl<T> NoUninit for Twhere T: Pod,