Struct safe_arch::m256d

source ·
#[repr(transparent)]
pub struct m256d(pub __m256d);
Expand description

The data for a 256-bit AVX register of four f64 values.

  • This is very similar to having [f64; 4]. 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.

Tuple Fields§

§0: __m256d

Implementations§

source§

impl m256d

source

pub fn to_array(self) -> [f64; 4]

Transmutes the m256d to an array.

Same as m.into(), just lets you be more explicit about what’s happening.

source

pub fn from_array(f: [f64; 4]) -> Self

Transmutes an array into m256d.

Same as m256d::from(arr), it just lets you be more explicit about what’s happening.

source

pub fn to_bits(self) -> [u64; 4]

Converts into the bit patterns of these doubles ([u64;4]).

Like f64::to_bits, but both lanes at once.

source

pub fn from_bits(bits: [u64; 4]) -> Self

Converts from the bit patterns of these doubles ([u64;4]).

Like f64::from_bits, but both lanes at once.

Trait Implementations§

source§

impl Add for m256d

§

type Output = m256d

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl AddAssign for m256d

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl Binary for m256d

source§

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

Binary formats each double’s bit pattern (via f64::to_bits).

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

impl BitAnd for m256d

§

type Output = m256d

The resulting type after applying the & operator.
source§

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

Performs the & operation. Read more
source§

impl BitAndAssign for m256d

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl BitOr for m256d

§

type Output = m256d

The resulting type after applying the | operator.
source§

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

Performs the | operation. Read more
source§

impl BitOrAssign for m256d

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl BitXor for m256d

§

type Output = m256d

The resulting type after applying the ^ operator.
source§

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

Performs the ^ operation. Read more
source§

impl BitXorAssign for m256d

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl Clone for m256d

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 m256d

source§

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

Debug formats each double.

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

impl Default for m256d

source§

fn default() -> Self

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

impl Display for m256d

source§

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

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

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

impl Div for m256d

§

type Output = m256d

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl DivAssign for m256d

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl From<[f64; 4]> for m256d

source§

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

Converts to this type from the input type.
source§

impl From<m256d> for [f64; 4]

source§

fn from(m: m256d) -> Self

Converts to this type from the input type.
source§

impl LowerExp for m256d

source§

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

LowerExp formats each double.

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

impl LowerHex for m256d

source§

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

LowerHex formats each double’s bit pattern (via f64::to_bits).

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

impl Mul for m256d

§

type Output = m256d

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl MulAssign for m256d

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl Neg for m256d

§

type Output = m256d

The resulting type after applying the - operator.
source§

fn neg(self) -> Self

Performs the unary - operation. Read more
source§

impl Not for m256d

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-ones bit pattern.

§

type Output = m256d

The resulting type after applying the ! operator.
source§

impl Octal for m256d

source§

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

Octal formats each double’s bit pattern (via f64::to_bits).

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

impl PartialEq for m256d

source§

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

Performs a comparison to get a mask, then moves the mask and checks for all true.

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 Sub for m256d

§

type Output = m256d

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl SubAssign for m256d

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl TransparentWrapper<__m256d> for m256d

source§

fn wrap(s: Inner) -> Self
where 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) -> Inner
where 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 m256d

source§

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

UpperExp formats each double.

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

impl UpperHex for m256d

source§

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

UpperHex formats each double’s bit pattern (via f64::to_bits).

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

impl Zeroable for m256d

source§

fn zeroed() -> Self

source§

impl Copy for m256d

source§

impl Pod for m256d

Auto Trait Implementations§

§

impl Freeze for m256d

§

impl RefUnwindSafe for m256d

§

impl Send for m256d

§

impl Sync for m256d

§

impl Unpin for m256d

§

impl UnwindSafe for m256d

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> CheckedBitPattern for T
where 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 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, U> TryFrom<U> for T
where 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 T
where 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 T
where T: Pod,

source§

impl<T> NoUninit for T
where T: Pod,