AGX Dynamics  2.37.2.0
agx::FloatingPointExceptions Namespace Reference

Enumerations

enum  ExceptionCode {
  FP_EXC_NONE = 0, FP_EXC_INVALID_OPERATION = 1, FP_EXC_DIVISION_BY_ZERO = 2, FP_EXC_OVERFLOW = 4,
  FP_EXC_UNDERFLOW = 8, FP_EXC_INEXACT = 16, FP_EXC_ALL = FP_EXC_INVALID_OPERATION | FP_EXC_DIVISION_BY_ZERO | FP_EXC_OVERFLOW | FP_EXC_UNDERFLOW | FP_EXC_INEXACT
}
 

Functions

void AGXCORE_EXPORT applyFloatingPointExceptionSettings ()
 Applies floating point exceptions as specified by the setFloatingPointExceptionSettings-function, but for current core. More...
 
int AGXCORE_EXPORT getFloatingPointExceptionSettings ()
 Gets the global floating point exception settings. More...
 
void AGXCORE_EXPORT setFloatingPointExceptionSettings (int mask)
 Sets global floating point exception settings for AGX, and applies them for current thread. More...
 

Enumeration Type Documentation

◆ ExceptionCode

Enumerator
FP_EXC_NONE 
FP_EXC_INVALID_OPERATION 
FP_EXC_DIVISION_BY_ZERO 
FP_EXC_OVERFLOW 
FP_EXC_UNDERFLOW 
FP_EXC_INEXACT 
FP_EXC_ALL 

Definition at line 29 of file FloatingPointExceptions.h.

Function Documentation

◆ applyFloatingPointExceptionSettings()

void AGXCORE_EXPORT agx::FloatingPointExceptions::applyFloatingPointExceptionSettings ( )

Applies floating point exceptions as specified by the setFloatingPointExceptionSettings-function, but for current core.

See setFloatingPointExceptionSettings for more information.

◆ getFloatingPointExceptionSettings()

int AGXCORE_EXPORT agx::FloatingPointExceptions::getFloatingPointExceptionSettings ( )

Gets the global floating point exception settings.

See the ExceptionCode-enum.

◆ setFloatingPointExceptionSettings()

void AGXCORE_EXPORT agx::FloatingPointExceptions::setFloatingPointExceptionSettings ( int  mask)

Sets global floating point exception settings for AGX, and applies them for current thread.

Not thread-safe. Other threads will read this setting in their constructor and apply it using the applyFloatingPointExceptionSettings-function below.

Note that these are hardware exceptions and will also be thrown by other binaries within the same process.

For catching floating point exceptions, please see http://msdn.microsoft.com/en-us/library/te2k2f2t.aspx for visual studio and http://www.gnu.org/software/libc/manual/html_node/Program-Error-Signals.html on unix-like systems.

Parameters
maskA bitmask with settings according to the FloatingPointExceptions-namespace.