disable optimization of cputime function for MSVC++ to avoid bogus 0s reports
This commit is contained in:
@ -112,6 +112,8 @@ using namespace LAMMPS_NS;
|
|||||||
// clang compilers are optimizing this function too aggressively returning always 0
|
// clang compilers are optimizing this function too aggressively returning always 0
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
[[clang::optnone]]
|
[[clang::optnone]]
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#pragma optimize("",off)
|
||||||
#endif
|
#endif
|
||||||
double platform::cputime()
|
double platform::cputime()
|
||||||
// clang-format on
|
// clang-format on
|
||||||
@ -143,6 +145,9 @@ double platform::cputime()
|
|||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#pragma optimize("",on)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
get wall time
|
get wall time
|
||||||
|
|||||||
Reference in New Issue
Block a user