Set up trapping for floating point exceptions (signal FPE). More...
Classes | |
class | ignore |
Helper to locally ignore SIGFPE handling. More... | |
Public Member Functions | |
sigFpe () | |
~sigFpe () | |
sigFpe () | |
~sigFpe () | |
Static Public Member Functions | |
static bool | requested () |
Check if SIGFPE signals handler is to be enabled. More... | |
static bool | active () |
True if SIGFPE handling is currently active. More... | |
static bool | nanActive () |
True if NaN memory initialisation is currently active. More... | |
static void | set (bool verbose=false) |
Activate SIGFPE signal handler when FOAM_SIGFPE is set. More... | |
static void | unset (bool verbose=false) |
Deactivate SIGFPE signal handler and NaN memory initialisation. More... | |
static void | fillNan (UList< scalar > &list) |
Fill data block with NaN values. More... | |
static bool | requested () |
Check if SIGFPE signals handler is to be enabled. More... | |
static bool | active () |
True if SIGFPE handling is currently active. More... | |
static bool | nanActive () |
True if NaN memory initialisation is currently active. More... | |
static void | set (bool verbose=false) |
Activate SIGFPE signal handler when FOAM_SIGFPE is set. More... | |
static void | unset (bool verbose=false) |
Deactivate SIGFPE signal handler and NaN memory initialisation. More... | |
static void | fillNan (UList< scalar > &list) |
Fill data block with NaN values. More... | |
Set up trapping for floating point exceptions (signal FPE).
Defined by controlDict InfoSwitch entries:
trapFpe
, this causes usage of uninitialized scalars to trigger an abort.trapFpe
setNaN
Defined by controlDict InfoSwitch entries:
trapFpe
, this causes usage of uninitialized scalars to trigger an abort.trapFpe
setNaN
sigFpe | ( | ) |
Constructor calls set() to activate the FPE signal handler if it was was not previously activate and requested() returns true.
~sigFpe | ( | ) |
Destructor calls unset() to deactivate the FPE signal handler as required.
Definition at line 118 of file sigFpe.C.
References sigFpe::unset().
sigFpe | ( | ) |
Constructor calls set() to activate the FPE signal handler if it was was not previously activate and requested() returns true.
|
static |
Check if SIGFPE signals handler is to be enabled.
This is controlled by the trapFpe entry or the FOAM_SIGFPE environment variable
Definition at line 142 of file sigFpe.C.
References isTrue().
Referenced by sigFpe::set().
|
inlinestatic |
|
inlinestatic |
|
static |
Activate SIGFPE signal handler when FOAM_SIGFPE is set.
Fill memory with NaN when FOAM_SETNAN is set
Definition at line 148 of file sigFpe.C.
References Foam::endl(), Foam::Info, isTrue(), oldFpe_, sigFpe::requested(), and Foam::setHandler().
|
static |
Deactivate SIGFPE signal handler and NaN memory initialisation.
Definition at line 204 of file sigFpe.C.
References clearFpe(), Foam::endl(), Foam::Info, and Foam::resetHandler().
Referenced by sigFpe::~sigFpe().
|
static |
Fill data block with NaN values.
Definition at line 225 of file sigFpe.C.
Referenced by dynamicRefineFvMesh::mapFields().
|
static |
Check if SIGFPE signals handler is to be enabled.
This is controlled by the trapFpe entry or the FOAM_SIGFPE environment variable
|
inlinestatic |
|
inlinestatic |
|
static |
Activate SIGFPE signal handler when FOAM_SIGFPE is set.
Fill memory with NaN when FOAM_SETNAN is set
|
static |
Deactivate SIGFPE signal handler and NaN memory initialisation.
|
static |
Fill data block with NaN values.