Set up trapping for floating point exceptions (signal FPE). More...
#include <sigFpe.H>
Classes | |
| class | ignore |
| Helper to locally ignore SIGFPE handling. More... | |
Public Member Functions | |
| 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. | |
Static Public Member Functions | |
| static bool | requested () |
| Check if SIGFPE signals handler is to be enabled. | |
| static bool | active () noexcept |
| True if SIGFPE handling is currently active. | |
| static bool | nanActive () noexcept |
| True if NaN memory initialisation is currently active. | |
| static bool | nanActive (bool on) noexcept |
| Set NaN memory initialisation on/off. | |
| static void | set (bool verbose=false) |
| Activate SIGFPE handler when FOAM_SIGFPE is enabled. Activate fill memory with signaling_NaN when FOAM_SETNAN is enabled. | |
| static void | unset (bool verbose=false) |
| Deactivate SIGFPE handler and NaN memory initialisation. | |
| static void | fillNan_if (void *buf, size_t count) |
Fill data block with signaling_NaN values if nanActive(). Does a reinterpret to Foam::scalar. | |
| static void | fillNan (char *buf, size_t count) |
Fill data block with signaling_NaN values. Does a reinterpret to Foam::scalar. | |
| static void | fillNan (UList< float > &list) |
| Fill data block with (float) signaling_NaN values. | |
| static void | fillNan (UList< double > &list) |
| Fill data block with (double) signaling_NaN values. | |
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 | sigFpe | ( | ) |
Constructor calls set() to activate the FPE signal handler if it was was not previously activate and requested() returns true.
Referenced by sigFpe::ignore::ignore().

|
static |
Check if SIGFPE signals handler is to be enabled.
This is controlled by the trapFpe entry or the FOAM_SIGFPE environment variable
|
inlinestaticnoexcept |
True if SIGFPE handling is currently active.
Definition at line 159 of file sigFpe.H.
References Foam::noexcept.
Referenced by sigFpe::ignore::ignore().

|
inlinestaticnoexcept |
True if NaN memory initialisation is currently active.
Definition at line 164 of file sigFpe.H.
References Foam::noexcept.
|
inlinestaticnoexcept |
|
static |
Activate SIGFPE handler when FOAM_SIGFPE is enabled. Activate fill memory with signaling_NaN when FOAM_SETNAN is enabled.
Referenced by argList::parse(), and sigFpe::ignore::reset().

|
static |
Deactivate SIGFPE handler and NaN memory initialisation.
Referenced by sigFpe::ignore::ignore().

|
inlinestatic |
Fill data block with signaling_NaN values if nanActive(). Does a reinterpret to Foam::scalar.
|
inlinestatic |
Fill data block with signaling_NaN values. Does a reinterpret to Foam::scalar.
Definition at line 209 of file sigFpe.H.
Referenced by dynamicRefineFvMesh::mapFields().

|
static |
Fill data block with (float) signaling_NaN values.
|
static |
Fill data block with (double) signaling_NaN values.