Struct PlatformProperties

Source
pub struct PlatformProperties {
Show 13 fields pub canonical_nan_sign: Sign, pub canonical_nan_mantissa_msb: bool, pub canonical_nan_mantissa_second_to_msb: bool, pub canonical_nan_mantissa_rest: bool, pub std_bin_ops_nan_propagation_mode: BinaryNaNPropagationMode, pub fma_nan_propagation_mode: TernaryNaNPropagationMode, pub fma_inf_zero_qnan_result: FMAInfZeroQNaNResult, pub round_to_integral_nan_propagation_mode: UnaryNaNPropagationMode, pub next_up_or_down_nan_propagation_mode: UnaryNaNPropagationMode, pub scale_b_nan_propagation_mode: UnaryNaNPropagationMode, pub sqrt_nan_propagation_mode: UnaryNaNPropagationMode, pub float_to_float_conversion_nan_propagation_mode: FloatToFloatConversionNaNPropagationMode, pub rsqrt_nan_propagation_mode: UnaryNaNPropagationMode, /* private fields */
}
Expand description

properties of a floating-point implementation

Fields§

§canonical_nan_sign: Sign

sign of the canonical NaN

§canonical_nan_mantissa_msb: bool

most-significant-bit of the mantissa of the canonical NaN

§canonical_nan_mantissa_second_to_msb: bool

second-most-significant-bit of the mantissa of the canonical NaN

§canonical_nan_mantissa_rest: bool

rest of the bits of the mantissa of the canonical NaN

§std_bin_ops_nan_propagation_mode: BinaryNaNPropagationMode

NaN payload propagation mode for the standard binary operations

§fma_nan_propagation_mode: TernaryNaNPropagationMode

NaN payload propagation mode for fused_mul_add

§fma_inf_zero_qnan_result: FMAInfZeroQNaNResult

the result of fused_mul_add for (Infinity * 0.0) + QNaN and (0.0 * Infinity) + QNaN

§round_to_integral_nan_propagation_mode: UnaryNaNPropagationMode

NaN payload propagation mode for round_to_integral

§next_up_or_down_nan_propagation_mode: UnaryNaNPropagationMode

NaN payload propagation mode for next_up_or_down, next_up, and next_down

§scale_b_nan_propagation_mode: UnaryNaNPropagationMode

NaN payload propagation mode for scale_b

§sqrt_nan_propagation_mode: UnaryNaNPropagationMode

NaN payload propagation mode for sqrt

§float_to_float_conversion_nan_propagation_mode: FloatToFloatConversionNaNPropagationMode

NaN payload propagation mode for float-to-float conversions

§rsqrt_nan_propagation_mode: UnaryNaNPropagationMode

NaN payload propagation mode for rsqrt

Implementations§

Source§

impl PlatformProperties

Source

pub const ARM: PlatformProperties

ARM 32-bit platform properties

Source

pub const RISC_V: PlatformProperties

RISC-V platform properties

Source

pub const POWER: PlatformProperties

Power ISA platform properties

Source

pub const MIPS_2008: PlatformProperties

MIPS 2008 revision platform properties

Source

pub const X86_SSE: PlatformProperties

x86 SSE/AVX platform properties

Source

pub const SPARC: PlatformProperties

Sparc platform properties

Source

pub const HPPA: PlatformProperties

HPPA platform properties

Source

pub const MIPS_LEGACY: PlatformProperties

MIPS pre-2008 revision platform properties

Source§

impl PlatformProperties

Source

pub const fn new_simple( canonical_nan_sign: Sign, canonical_nan_mantissa_msb: bool, canonical_nan_mantissa_second_to_msb: bool, canonical_nan_mantissa_rest: bool, unary_nan_propagation_mode: UnaryNaNPropagationMode, binary_nan_propagation_mode: BinaryNaNPropagationMode, ternary_nan_propagation_mode: TernaryNaNPropagationMode, fma_inf_zero_qnan_result: FMAInfZeroQNaNResult, float_to_float_conversion_nan_propagation_mode: FloatToFloatConversionNaNPropagationMode, ) -> Self

create PlatformProperties

Source

pub const fn default() -> Self

default PlatformProperties. currently returns RISC_V

Source

pub fn quiet_nan_format(self) -> QuietNaNFormat

get the QuietNaNFormat

Trait Implementations§

Source§

impl Clone for PlatformProperties

Source§

fn clone(&self) -> PlatformProperties

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 PlatformProperties

Source§

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

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

impl Default for PlatformProperties

Source§

fn default() -> PlatformProperties

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

impl Hash for PlatformProperties

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for PlatformProperties

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 Copy for PlatformProperties

Source§

impl Eq for PlatformProperties

Source§

impl StructuralPartialEq for PlatformProperties

Auto Trait Implementations§

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> 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, 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> 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.