pub enum FpContract {
Off,
On,
Fast,
}Expand description
How far a multiply and an addition may be fused into one rounding.
crate::Flags::CONTRACT is the same question asked about one instruction, and it is the
one the optimizer reads. This is the one the code generator reads, because by the time it
runs the two operations it might fuse may have arrived from different expressions and the
flags that were on them are gone. off is the default here rather than the one C says,
because the frontend is what knows what the command line asked for and a licence nobody
granted should not be assumed.
Variants§
Off
Never. Every rounding the source asked for happens.
On
Within one expression, which is what C’s FP_CONTRACT pragma allows.
Fast
Anywhere in the function, which is what -ffp-contract=fast means and what gcc does by
default.
Implementations§
Trait Implementations§
Source§impl Clone for FpContract
impl Clone for FpContract
Source§fn clone(&self) -> FpContract
fn clone(&self) -> FpContract
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FpContract
Source§impl Debug for FpContract
impl Debug for FpContract
Source§impl Default for FpContract
impl Default for FpContract
Source§fn default() -> FpContract
fn default() -> FpContract
Returns the “default value” for a type. Read more
Source§impl Display for FpContract
impl Display for FpContract
impl Eq for FpContract
Source§impl Hash for FpContract
impl Hash for FpContract
Source§impl Ord for FpContract
impl Ord for FpContract
Source§fn cmp(&self, other: &FpContract) -> Ordering
fn cmp(&self, other: &FpContract) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for FpContract
impl PartialEq for FpContract
Source§impl PartialOrd for FpContract
impl PartialOrd for FpContract
impl StructuralPartialEq for FpContract
Auto Trait Implementations§
impl Freeze for FpContract
impl RefUnwindSafe for FpContract
impl Send for FpContract
impl Sync for FpContract
impl Unpin for FpContract
impl UnsafeUnpin for FpContract
impl UnwindSafe for FpContract
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
Mutably borrows from an owned value. Read more