AGX Dynamics
2.37.3.2
FloatingPointExceptions.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2024. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
#ifndef AGX_FLOATING_POINT_EXCEPTIONS_H
18
#define AGX_FLOATING_POINT_EXCEPTIONS_H
19
20
21
#include <agx/config.h>
22
#include <
agx/agx.h
>
23
#include <
agx/agxCore_export.h
>
24
25
26
namespace
agx
27
{
28
namespace
FloatingPointExceptions {
29
enum
ExceptionCode
{
30
FP_EXC_NONE
= 0,
31
FP_EXC_INVALID_OPERATION
= 1,
// Invalid operation (e.g., square root of a negative number - qNaN by default).
32
FP_EXC_DIVISION_BY_ZERO
= 2,
// Division by zero (e.g., 1/0 or log(0) +- infinity by default)
33
FP_EXC_OVERFLOW
= 4,
// Overflow (a result is too large to be represented correctly) +- infinity by default).
34
FP_EXC_UNDERFLOW
= 8,
// Underflow (result too small and inexact) (returns a denormalized value by default).
35
FP_EXC_INEXACT
= 16,
// Inexact (returns correctly rounded result by default).
36
FP_EXC_ALL
=
FP_EXC_INVALID_OPERATION
|
FP_EXC_DIVISION_BY_ZERO
|
FP_EXC_OVERFLOW
|
FP_EXC_UNDERFLOW
|
FP_EXC_INEXACT
37
};
38
55
void
AGXCORE_EXPORT
setFloatingPointExceptionSettings
(
int
mask);
56
61
int
AGXCORE_EXPORT
getFloatingPointExceptionSettings
();
62
68
void
AGXCORE_EXPORT
applyFloatingPointExceptionSettings
();
69
70
}
71
72
}
73
74
75
76
#endif
agx::FloatingPointExceptions::setFloatingPointExceptionSettings
void AGXCORE_EXPORT setFloatingPointExceptionSettings(int mask)
Sets global floating point exception settings for AGX, and applies them for current thread...
agx::FloatingPointExceptions::applyFloatingPointExceptionSettings
void AGXCORE_EXPORT applyFloatingPointExceptionSettings()
Applies floating point exceptions as specified by the setFloatingPointExceptionSettings-function, but for current core.
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
agx::FloatingPointExceptions::getFloatingPointExceptionSettings
int AGXCORE_EXPORT getFloatingPointExceptionSettings()
Gets the global floating point exception settings.
agxCore_export.h
agx::FloatingPointExceptions::FP_EXC_OVERFLOW
Definition:
FloatingPointExceptions.h:33
agx::FloatingPointExceptions::FP_EXC_UNDERFLOW
Definition:
FloatingPointExceptions.h:34
agx::FloatingPointExceptions::FP_EXC_ALL
Definition:
FloatingPointExceptions.h:36
agx.h
agx::FloatingPointExceptions::FP_EXC_INEXACT
Definition:
FloatingPointExceptions.h:35
agx::FloatingPointExceptions::FP_EXC_DIVISION_BY_ZERO
Definition:
FloatingPointExceptions.h:32
agx::FloatingPointExceptions::ExceptionCode
ExceptionCode
Definition:
FloatingPointExceptions.h:29
agx::FloatingPointExceptions::FP_EXC_INVALID_OPERATION
Definition:
FloatingPointExceptions.h:31
AGXCORE_EXPORT
#define AGXCORE_EXPORT
agx::FloatingPointExceptions::FP_EXC_NONE
Definition:
FloatingPointExceptions.h:30
include
agx
FloatingPointExceptions.h
Generated on Fri Apr 12 2024 12:40:22 for AGX Dynamics by
1.8.13