GEOSX
|
Contains functions that interact with the system or runtime environment. More...
Classes | |
class | FloatingPointExceptionGuard |
Changes the floating point environment and reverts it when destoyed. More... | |
Functions | |
std::string | stackTrace (bool const lineInfo) |
Return a demangled stack trace of the last 25 frames. More... | |
std::string | demangle (char const *const name) |
template<class T > | |
std::string | demangleType () |
template<class T > | |
std::string | demangleType (T const &) |
void | setErrorHandler (std::function< void() > const &handler) |
Set the error handler called by LVARRAY_ERROR and others. More... | |
void | callErrorHandler () |
Call the error handler, by default this is std::abort. | |
void | stackTraceHandler (int const sig, bool const exit) |
Print signal information and a stack trace to standard out, optionally aborting. More... | |
void | setSignalHandling (void(*handler)(int)) |
Set the signal handler for common signals. More... | |
void | resetSignalHandling () |
Rest the signal handling back to the original state. | |
int | getDefaultFloatingPointExceptions () |
Get the default set of exceptions to check. More... | |
int | enableFloatingPointExceptions (int const exceptions=getDefaultFloatingPointExceptions()) |
A wrapper around feenableexcept that work on OSX. More... | |
int | disableFloatingPointExceptions (int const exceptions=getDefaultFloatingPointExceptions()) |
A wrapper around fedisableexcept that work on OSX. More... | |
void | setFPE () |
Sets the floating point environment. More... | |
std::string | calculateSize (size_t const bytes) |
Contains functions that interact with the system or runtime environment.
std::string LvArray::system::calculateSize | ( | size_t const | bytes | ) |
bytes
converted to either KB, MB, or GB. bytes | The number of bytes. |
std::string LvArray::system::demangle | ( | char const *const | name | ) |
name
. name | The mangled name. |
|
inline |
T. | |
T | The type to demangle. |
Definition at line 50 of file system.hpp.
|
inline |
T. | |
T | The type to demangle. |
Definition at line 58 of file system.hpp.
int LvArray::system::disableFloatingPointExceptions | ( | int const | exceptions = getDefaultFloatingPointExceptions() | ) |
A wrapper around fedisableexcept
that work on OSX.
exceptions | The set of floating point exceptions to disable. |
int LvArray::system::enableFloatingPointExceptions | ( | int const | exceptions = getDefaultFloatingPointExceptions() | ) |
A wrapper around feenableexcept
that work on OSX.
exceptions | The set of floating point exceptions to enable. |
int LvArray::system::getDefaultFloatingPointExceptions | ( | ) |
Get the default set of exceptions to check.
void LvArray::system::setErrorHandler | ( | std::function< void() > const & | handler | ) |
Set the error handler called by LVARRAY_ERROR and others.
handler | The error handler. |
void LvArray::system::setFPE | ( | ) |
Sets the floating point environment.
Sets the floating point environment such that FE_DIVBYZERO, FE_OVERFLOW or FE_INVALID throw exceptions. Denormal numbers are flushed to zero.
void LvArray::system::setSignalHandling | ( | void(*)(int) | handler | ) |
Set the signal handler for common signals.
handler | The signal handler. |
std::string LvArray::system::stackTrace | ( | bool const | lineInfo | ) |
Return a demangled stack trace of the last 25 frames.
lineInfo | If true then file and line numbers will be added to the trace if available. This is only supported if LVARRAY_ADDR2LINE_EXEC is defined and normally only works in debug builds. |
void LvArray::system::stackTraceHandler | ( | int const | sig, |
bool const | exit | ||
) |
Print signal information and a stack trace to standard out, optionally aborting.
sig | The signal received. |
exit | If true abort execution. |