9 #ifndef TEMPUS_UNIT_TEST_MAIN_UTILS_HPP
10 #define TEMPUS_UNIT_TEST_MAIN_UTILS_HPP
12 #if defined(__linux__) && defined(__GNUC__) && !defined(__INTEL_COMPILER)
14 #elif defined(__APPLE__) && defined(__GNUC__) && defined(__SSE__)
15 #include <xmmintrin.h>
18 namespace Tempus_Test {
29 #if defined(__APPLE__) && defined(__GNUC__) && defined(__SSE__)
30 static int eMask = _MM_GET_EXCEPTION_MASK();
34 #if defined(__linux__) && defined(__GNUC__) && !defined(__INTEL_COMPILER)
35 feenableexcept(FE_DIVBYZERO | FE_OVERFLOW | FE_INVALID);
36 #elif defined(__APPLE__) && defined(__GNUC__) && defined(__SSE__)
37 eMask = _MM_GET_EXCEPTION_MASK();
38 _MM_SET_EXCEPTION_MASK(eMask & ~_MM_MASK_DIV_ZERO & ~_MM_MASK_OVERFLOW &
43 #if defined(__linux__) && defined(__GNUC__) && !defined(__INTEL_COMPILER)
44 fedisableexcept(FE_DIVBYZERO | FE_OVERFLOW | FE_INVALID);
45 #elif defined(__APPLE__) && defined(__GNUC__) && defined(__SSE__)
46 _MM_SET_EXCEPTION_MASK(eMask);
53 #endif // TEMPUS_UNIT_TEST_MAIN_UTILS_HPP
void enableFPE(bool enableFPE)
Enable Floating Point Exceptions.