|
libMesh
|
The FPEDisabler class puts Floating-Point Exception (FPE) trapping on hold during its lifetime, restoring the FE environment upon destruction.
More...
#include <fpe_disabler.h>
Public Member Functions | |
| FPEDisabler () | |
| ~FPEDisabler () | |
Public Attributes | |
| std::fenv_t | old_env |
The FPEDisabler class puts Floating-Point Exception (FPE) trapping on hold during its lifetime, restoring the FE environment upon destruction.
This allows code to ignore known/expected FPE sources, e.g. to work around a bug in HDF5 1.14.3 or to test for errors in a more sophisticated way and throw a C++ exception instead.
FE environment changes should not be made during the lifetime of this object, as they will not be preserved when the destructor restores the original environment.
Temporarily disables Floating-Point Exception (FPE) trapping
Definition at line 49 of file fpe_disabler.h.
|
inline |
Definition at line 51 of file fpe_disabler.h.
References old_env.
|
inline |
Definition at line 56 of file fpe_disabler.h.
References old_env.
| std::fenv_t libMesh::FPEDisabler::old_env |
Definition at line 61 of file fpe_disabler.h.
Referenced by FPEDisabler(), and ~FPEDisabler().