|
| static bool | requested () |
| | Check if SIGFPE signals handler is to be enabled. More...
|
| |
| static bool | active () noexcept |
| | True if SIGFPE handling is currently active. More...
|
| |
| static bool | nanActive () noexcept |
| | True if NaN memory initialisation is currently active. More...
|
| |
| static bool | nanActive (bool on) noexcept |
| | Set NaN memory initialisation on/off. More...
|
| |
| 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. More...
|
| |
| static void | unset (bool verbose=false) |
| | Deactivate SIGFPE handler and NaN memory initialisation. More...
|
| |
| static void | fillNan_if (void *buf, size_t count) |
| | Fill data block with signaling_NaN values if nanActive(). Does a reinterpret to Foam::scalar. More...
|
| |
| static void | fillNan (char *buf, size_t count) |
| | Fill data block with signaling_NaN values. Does a reinterpret to Foam::scalar. More...
|
| |
| static void | fillNan (UList< float > &list) |
| | Fill data block with (float) signaling_NaN values. More...
|
| |
| static void | fillNan (UList< double > &list) |
| | Fill data block with (double) signaling_NaN values. More...
|
| |
Set up trapping for floating point exceptions (signal FPE).
Defined by controlDict InfoSwitch entries:
- trapFpe
- Enable floating point exception trapping.
- setNaN
- Initialization all malloced memory to NaN. Combined with
trapFpe, this causes usage of uninitialized scalars to trigger an abort.
Environment variables:
- FOAM_SIGFPE (true|false)
- overrides
trapFpe
- FOAM_SETNAN (true|false)
- overrides
setNaN
Note that trapping can be set/removed through the static member functions or through the scope of the object (constructor sets trapping; destructor restores original). The class behaves as a singleton.
- Source files
-
Definition at line 72 of file sigFpe.H.