19 <<
"Floating point exception mask is " << std::showbase << std::hex
20 << femask <<
"\tDivByZero exception is" 21 <<
on_or_off(femask & FE_DIVBYZERO) <<
"\tInvalid exception is" 22 <<
on_or_off(femask & FE_INVALID) <<
"\tOverFlow exception is" 23 <<
on_or_off(femask & FE_OVERFLOW) <<
"\tUnderFlow exception is" 29 FloatingPointControl::FloatingPointControl(
Parameters const& c,
31 : enableDivByZeroEx_{c().enableDivByZeroEx()}
49 unsigned short int enable_except{};
50 unsigned short int enable_sse{};
52 enable_except |= FE_DIVBYZERO;
53 enable_sse |= fpControl_ZM_MASK;
56 enable_except |= FE_INVALID;
57 enable_sse |= fpControl_IM_MASK;
60 enable_except |= FE_OVERFLOW;
61 enable_sse |= fpControl_OM_MASK;
64 enable_except |= FE_UNDERFLOW;
65 enable_sse |= fpControl_UM_MASK;
69 fpControl.fpcw = (fpControl.fpcw | FE_ALL_EXCEPT) & (~enable_except);
73 (fpControl.fpcw & (~fpControl_ALL_PREC)) | fpControl_DOUBLE_PREC;
75 #ifdef fpControl_HAVE_MXCSR 78 (fpControl.mxcsr | fpControl_ALL_SSE_EXCEPT) & (~enable_sse);
85 <<
"\nUpdated FP settings per user's configuration";
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
unsigned short int mask_t
fp_detail::fp_control_t OSdefault_
precision_t getPrecision() const
char const * on_or_off(bool const b)
fp_control_t getFPControl()
fp_control_t setFPControl(fp_control_t const &fpControl)