[−][src]Struct safe_arch::m256
The data for a 256-bit AVX register of eight f32
lanes.
- This is very similar to having
[f32; 8]
. The main difference is that it's aligned to 32 instead of just 4, and of course you can perform various intrinsic operations on it.
Implementations
impl m256
[src]
#[must_use]pub fn to_array(self) -> [f32; 8]
[src]
Transmutes the m256
to an array.
Same as m.into()
, just lets you be more explicit about what's happening.
#[must_use]pub fn from_array(f: [f32; 8]) -> Self
[src]
Transmutes an array into m256
.
Same as m256::from(arr)
, it just lets you be more explicit about what's
happening.
#[must_use]pub fn to_bits(self) -> [u32; 8]
[src]
Converts into the bit patterns of these floats ([u32;8]
).
Like f32::to_bits
, but all eight lanes at once.
#[must_use]pub fn from_bits(bits: [u32; 8]) -> Self
[src]
Converts from the bit patterns of these floats ([u32;8]
).
Like f32::from_bits
, but all eight lanes at once.
Trait Implementations
impl Add<m256> for m256
[src]
type Output = Self
The resulting type after applying the +
operator.
#[must_use]fn add(self, rhs: Self) -> Self
[src]
impl AddAssign<m256> for m256
[src]
fn add_assign(&mut self, rhs: Self)
[src]
impl Binary for m256
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Binary formats each float's bit pattern (via f32::to_bits
).
let f = format!("{:b}", m256::default()); assert_eq!(&f, "(0, 0, 0, 0, 0, 0, 0, 0)");
impl BitAnd<m256> for m256
[src]
type Output = Self
The resulting type after applying the &
operator.
#[must_use]fn bitand(self, rhs: Self) -> Self
[src]
impl BitAndAssign<m256> for m256
[src]
fn bitand_assign(&mut self, rhs: Self)
[src]
impl BitOr<m256> for m256
[src]
type Output = Self
The resulting type after applying the |
operator.
#[must_use]fn bitor(self, rhs: Self) -> Self
[src]
impl BitOrAssign<m256> for m256
[src]
fn bitor_assign(&mut self, rhs: Self)
[src]
impl BitXor<m256> for m256
[src]
type Output = Self
The resulting type after applying the ^
operator.
#[must_use]fn bitxor(self, rhs: Self) -> Self
[src]
impl BitXorAssign<m256> for m256
[src]
fn bitxor_assign(&mut self, rhs: Self)
[src]
impl Clone for m256
[src]
#[must_use]fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for m256
[src]
impl Debug for m256
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Debug formats each float.
let f = format!("{:?}", m256::default()); assert_eq!(&f, "m256(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)");
impl Default for m256
[src]
impl Display for m256
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Display formats each float, and leaves the type name off of the font.
let f = format!("{}", m256::default()); assert_eq!(&f, "(0, 0, 0, 0, 0, 0, 0, 0)");
impl Div<m256> for m256
[src]
type Output = Self
The resulting type after applying the /
operator.
#[must_use]fn div(self, rhs: Self) -> Self
[src]
impl DivAssign<m256> for m256
[src]
fn div_assign(&mut self, rhs: Self)
[src]
impl From<[f32; 8]> for m256
[src]
impl From<m256> for [f32; 8]
[src]
impl LowerExp for m256
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
LowerExp formats each float.
let f = format!("{:e}", m256::default()); assert_eq!(&f, "(0e0, 0e0, 0e0, 0e0, 0e0, 0e0, 0e0, 0e0)");
impl LowerHex for m256
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
LowerHex formats each float's bit pattern (via f32::to_bits
).
let f = format!("{:x}", m256::default()); assert_eq!(&f, "(0, 0, 0, 0, 0, 0, 0, 0)");
impl Mul<m256> for m256
[src]
type Output = Self
The resulting type after applying the *
operator.
#[must_use]fn mul(self, rhs: Self) -> Self
[src]
impl MulAssign<m256> for m256
[src]
fn mul_assign(&mut self, rhs: Self)
[src]
impl Neg for m256
[src]
type Output = Self
The resulting type after applying the -
operator.
#[must_use]fn neg(self) -> Self
[src]
impl Not for m256
[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.
impl Octal for m256
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Octal formats each float's bit pattern (via f32::to_bits
).
let f = format!("{:o}", m256::default()); assert_eq!(&f, "(0, 0, 0, 0, 0, 0, 0, 0)");
impl PartialEq<m256> for m256
[src]
#[must_use]fn eq(&self, other: &Self) -> bool
[src]
let a = m256::from([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]); let b = m256::from([9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0]); assert!(a == a); assert!(a != b);
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Pod for m256
[src]
impl Sub<m256> for m256
[src]
type Output = Self
The resulting type after applying the -
operator.
#[must_use]fn sub(self, rhs: Self) -> Self
[src]
impl SubAssign<m256> for m256
[src]
fn sub_assign(&mut self, rhs: Self)
[src]
impl TransparentWrapper<__m256> for m256
[src]
impl UpperExp for m256
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
UpperExp formats each float.
let f = format!("{:E}", m256::default()); assert_eq!(&f, "(0E0, 0E0, 0E0, 0E0, 0E0, 0E0, 0E0, 0E0)");
impl UpperHex for m256
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
UpperHex formats each float's bit pattern (via f32::to_bits
).
let f = format!("{:X}", m256::default()); assert_eq!(&f, "(0, 0, 0, 0, 0, 0, 0, 0)");
impl Zeroable for m256
[src]
fn zeroed() -> Self
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,