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

Function enableFPExcept

Src/Base/AMReX.cpp:1084–1097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1082}
1083
1084FPExcept enableFPExcept (FPExcept excepts)
1085{
1086 auto prev = getFPExcept();
1087#if defined(__linux__) && defined(__GLIBC__)
1088 int flags = 0;
1089 if (any(excepts & FPExcept::invalid )) { flags |= FE_INVALID ; }
1090 if (any(excepts & FPExcept::zero )) { flags |= FE_DIVBYZERO; }
1091 if (any(excepts & FPExcept::overflow)) { flags |= FE_OVERFLOW ; }
1092 feenableexcept(flags);
1093#else
1094 amrex::ignore_unused(excepts);
1095#endif
1096 return prev;
1097}
1098
1099void Init_minimal (MPI_Comm mpi_comm)
1100{

Callers

nothing calls this directly

Calls 2

getFPExceptFunction · 0.85
anyFunction · 0.85

Tested by

no test coverage detected