Struct frounding::RoundingState [] [src]

pub struct RoundingState {
    // some fields omitted
}

RoundingState Keep track of the current rounding mode of both the SSE and the x87 FPU units.

Methods

impl RoundingState
[src]

fn new() -> Self

Create new RoundingState struct and fill it with the current status of control regiters. When going out of scope the initial rounding mode is set.

fn current_rounding(&self) -> (RoundingMode, RoundingMode)

Return the current rounding mode of both SSE and FPU.

fn sse_rounding(&self) -> RoundingMode

Return the current rounding mode of the SSE unit.

fn fpu_rounding(&self) -> RoundingMode

Return the current rounding mode of x87 FPU unit.

fn upward(&mut self)

Set the rounding mode toward +infinity for both SSE and x87 FPU.

fn sse_upward(&mut self)

Set the rounding mode of the SSE toward +infinity.

fn fpu_upward(&mut self)

Set the rounding mode of the FPU toward +infinity.

fn downward(&mut self)

Set the rounding mode toward -infinity for both SSE and x87 FPU.

fn sse_downward(&mut self)

Set the rounding mode of the SSE toward -infinity.

fn fpu_downward(&mut self)

Set the rounding mode of the FPU toward -infinity.

fn to_nearest(&mut self)

Set the rounding mode to nearest for both SSE and x87 FPU.

fn sse_to_nearest(&mut self)

Set the rounding mode of the SSE to nearest

fn fpu_to_nearest(&mut self)

Set the rounding mode of FPU to nearest

fn to_zero(&mut self)

Set the rounding mode toward zero (aka truncate) for both SSE and x87 FPU.

fn sse_to_zero(&mut self)

Set the rounding mode of SSE toward zero (aka truncate)

fn fpu_to_zero(&mut self)

Set the rounding mode of FPU toward zero (aka truncate)

Trait Implementations

impl Clone for RoundingState
[src]

fn clone(&self) -> RoundingState

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for RoundingState
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Drop for RoundingState
[src]

Drop trait is implimented as when going out of scope the default status of the control registers. is retrived.

fn drop(&mut self)

A method called when the value goes out of scope. Read more