[][src]Struct safe_arch::m256i

#[repr(transparent)]pub struct m256i(pub __m256i);

The data for a 256-bit AVX 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.

Trait Implementations

impl Binary for m256i[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Binary formats each i32.

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

impl BitAnd<m256i> for m256i[src]

type Output = Self

The resulting type after applying the & operator.

#[must_use]fn bitand(self, rhs: Self) -> Self[src]

let a = m256i::from([0_i64, 0, 1, 1]);
let b = m256i::from([0_i64, 1, 0, 1]);
let c: [i64; 4] = (a & b).into();
assert_eq!(c, [0_i64, 0, 0, 1]);

impl BitAndAssign<m256i> for m256i[src]

impl BitOr<m256i> for m256i[src]

type Output = Self

The resulting type after applying the | operator.

#[must_use]fn bitor(self, rhs: Self) -> Self[src]

let a = m256i::from([0_i64, 0, 1, 1]);
let b = m256i::from([0_i64, 1, 0, 1]);
let c: [i64; 4] = (a | b).into();
assert_eq!(c, [0_i64, 1, 1, 1]);

impl BitOrAssign<m256i> for m256i[src]

impl BitXor<m256i> for m256i[src]

type Output = Self

The resulting type after applying the ^ operator.

#[must_use]fn bitxor(self, rhs: Self) -> Self[src]

let a = m256i::from([0_i64, 0, 1, 1]);
let b = m256i::from([0_i64, 1, 0, 1]);
let c: [i64; 4] = (a ^ b).into();
assert_eq!(c, [0_i64, 1, 1, 0]);

impl BitXorAssign<m256i> for m256i[src]

impl Clone for m256i[src]

impl Copy for m256i[src]

impl Debug for m256i[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Debug formats each i32.

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

impl Default for m256i[src]

impl Display for m256i[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

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

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

impl Eq for m256i[src]

impl From<[i128; 2]> for m256i[src]

impl From<[i16; 16]> for m256i[src]

impl From<[i32; 8]> for m256i[src]

impl From<[i64; 4]> for m256i[src]

impl From<[i8; 32]> for m256i[src]

impl From<[u128; 2]> for m256i[src]

impl From<[u16; 16]> for m256i[src]

impl From<[u32; 8]> for m256i[src]

impl From<[u64; 4]> for m256i[src]

impl From<[u8; 32]> for m256i[src]

impl From<m256i> for [i8; 32][src]

impl From<m256i> for [u8; 32][src]

impl From<m256i> for [i16; 16][src]

impl From<m256i> for [u16; 16][src]

impl From<m256i> for [i32; 8][src]

impl From<m256i> for [u32; 8][src]

impl From<m256i> for [i64; 4][src]

impl From<m256i> for [u64; 4][src]

impl From<m256i> for [i128; 2][src]

impl From<m256i> for [u128; 2][src]

impl LowerExp for m256i[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

LowerExp formats each i32.

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

impl LowerHex for m256i[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

LowerHex formats each i32.

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

impl Not for m256i[src]

type Output = Self

The resulting type after applying the ! operator.

#[must_use]fn not(self) -> Self[src]

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.

let a = m256i::from([0_u128, 0]);
let c: [u128; 2] = (!a).into();
assert_eq!(c, [u128::MAX, u128::MAX]);

impl Octal for m256i[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Octal formats each i32.

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

impl PartialEq<m256i> for m256i[src]

#[must_use]fn eq(&self, other: &Self) -> bool[src]

let a = m256i::from([0_i64, 0, 1, 1]);
let b = m256i::from([0_i64, 1, 0, 1]);
assert_eq!(a, a);
assert_ne!(a, b);

impl Pod for m256i[src]

impl TransparentWrapper<__m256i> for m256i[src]

impl UpperExp for m256i[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

UpperExp formats each i32.

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

impl UpperHex for m256i[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

UpperHex formats each i32.

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

impl Zeroable for m256i[src]

Auto Trait Implementations

impl Send for m256i

impl Sync for m256i

impl Unpin for m256i

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.