Homec4science

Replacing use of isfinite with macro ISFINITE

Authored by crtrott <crtrott@sandia.gov> on Dec 9 2015, 21:40.

Description

Replacing use of isfinite with macro ISFINITE

There is an issue with mixing cmath and math.h with some compilers.
One declares "isfinite" the other one declares "std::isfinite" (at
least with c++11). Generally LAMMPS include <math.h> (which technically
is deprecated since forever) while Kokkos will include <cmath>.

If you include both apparently cmath wins, and the global namespace
isfinite is not available (e.g. in GCC 4.8.4) when using C++11.
This patch fixes that by defining a macro which is either defined
as the global namespace isfinite or the std::isfinite.

Details

Committed
crtrott <crtrott@sandia.gov>Dec 9 2015, 21:40
Pushed
jungeOct 6 2016, 16:49
Parents
rLAMMPS9e70d356c2dc: Kokkos: Fix wrong usage of dual view in verlet_kokkos
Branches
Unknown
Tags
Unknown

Event Timeline

crtrott <crtrott@sandia.gov> committed rLAMMPS86b22bb8c990: Replacing use of isfinite with macro ISFINITE (authored by crtrott <crtrott@sandia.gov>).Dec 9 2015, 21:40