pub enum FastMath {
NotNaN,
NotInf,
UnsignedZero,
AllowReciprocal,
AllowContraction,
AllowReassociation,
AllowTransform,
ReducedPrecision,
}Expand description
Unchecked optimizations for float operations. May cause precision differences, or undefined behaviour if the relevant conditions are not followed.
Variants§
NotNaN
Assume values are never NaN. If they are, the result is considered undefined behaviour.
NotInf
Assume values are never Inf/-Inf. If they are, the result is considered undefined
behaviour.
UnsignedZero
Ignore sign on zero values.
AllowReciprocal
Allow swapping float division with a reciprocal, even if that swap would change precision.
AllowContraction
Allow contracting float operations into fewer operations, even if the precision could change.
AllowReassociation
Allow reassociation for float operations, even if the precision could change.
AllowTransform
Allow all mathematical transformations for float operations, including contraction and reassociation, even if the precision could change.
ReducedPrecision
Allow using lower precision intrinsics
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FastMath
impl<'de> Deserialize<'de> for FastMath
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FastMath, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FastMath, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for FastMath
impl Serialize for FastMath
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for FastMath
impl EnumSetType for FastMath
impl Eq for FastMath
Auto Trait Implementations§
impl Freeze for FastMath
impl RefUnwindSafe for FastMath
impl Send for FastMath
impl Sync for FastMath
impl Unpin for FastMath
impl UnwindSafe for FastMath
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.