#include <JobCFloatXImp.h>
Public Member Functions | |
| JobCFloatXImp (bool activate) | |
| ~JobCFloatXImp () | |
Static Public Member Functions | |
| bool | validate () |
Public Attributes | |
| bool | activate_ |
|
|
Definition at line 52 of file JobCFloatXImp.cxx. References activate_. 00052 :activate_(a) 00053 { 00054 if(activate_==true) 00055 { 00056 // only activate invalid operand, division by zero, and 00057 // overflow exceptions 00058 00059 #if defined(linux) 00060 #if defined(__GLIBC__)&&(__GLIBC__>2 || __GLIBC__==2 && __GLIBC_MINOR__>=1) 00061 // use fenv 00062 fenv_t newval; 00063 fegetenv(&old_setting); 00064 fegetenv(&newval); 00065 newval.__control_word &= ~(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); 00066 fesetenv(&newval); 00067 #else 00068 // fpu control stuff 00069 old_setting = __fpu_control; 00070 fpu_control_t newval = 00071 old_setting & ~( 00072 _FPU_MASK_IM 00073 |_FPU_MASK_ZM 00074 |_FPU_MASK_OM 00075 ); 00076 00077 _FPU_SETCW(newval); 00078 #endif 00079 #endif 00080 00081 #if defined(__APPLE__) 00082 #if defined(__i386__) 00083 // for intel chips: 00084 #elif defined(__x86_64__) 00085 // For 64bit apple installations84,85 00086 #else 00087 // for ppc chips: 00088 hexdouble t; 00089 fegetenvd(t.d); 00090 t.i.lo |= FE_ENABLE_DIVBYZERO | FE_ENABLE_OVERFLOW | FE_ENABLE_INVALID;; 00091 fesetenvd(t.d); 00092 signal(SIGFPE,macosx_fpe_handler); 00093 #endif 00094 #endif 00095 00096 } 00097 }
|
|
|
Definition at line 101 of file JobCFloatXImp.cxx. References activate_. 00102 {
00103 #if defined(linux)
00104 if(activate_==true)
00105 #if defined(__GLIBC__)&&(__GLIBC__>2 || __GLIBC__==2 && __GLIBC_MINOR__>=1)
00106 fesetenv(&old_setting);
00107 #else
00108 _FPU_SETCW(old_setting);
00109 #endif
00110 #endif
00111 }
|
|
|
|
|
|
Definition at line 30 of file JobCFloatXImp.h. Referenced by JobCFloatXImp(), and ~JobCFloatXImp(). |
1.3.9.1