MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / disableFPExcept

Function disableFPExcept

Src/Base/AMReX.cpp:1069–1082  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1067}
1068
1069FPExcept disableFPExcept (FPExcept excepts)
1070{
1071 auto prev = getFPExcept();
1072#if defined(__linux__) && defined(__GLIBC__)
1073 int flags = 0;
1074 if (any(excepts & FPExcept::invalid )) { flags |= FE_INVALID ; }
1075 if (any(excepts & FPExcept::zero )) { flags |= FE_DIVBYZERO; }
1076 if (any(excepts & FPExcept::overflow)) { flags |= FE_OVERFLOW ; }
1077 fedisableexcept(flags);
1078#else
1079 amrex::ignore_unused(excepts);
1080#endif
1081 return prev;
1082}
1083
1084FPExcept enableFPExcept (FPExcept excepts)
1085{

Callers

nothing calls this directly

Calls 2

getFPExceptFunction · 0.85
anyFunction · 0.85

Tested by

no test coverage detected