Homec4science

Fix an issue with usage of isfinite

Authored by crtrott <crtrott@sandia.gov> on Dec 10 2015, 19:48.

Description

Fix an issue with usage of isfinite

Depending on whether one includes <math.h> or <cmath> isfinite lives
in the global or in the std namespace, or in both. When compiling with
Kokkos <cmath> gets included, which no matter whether <math.h> gets
included before or after removes with some compilers isfinite from the
global namespace. Probably because it defines include guards, and it
undefines the isfinite macro which is defined in math.h.

This is a general issue in lammps where typically the C-header files are
used instead of the C++ header files. It might be worthwhile to think about
changing that.

The fix in this case is to replace isfinite with a Macro ISFINITE which is
appropriately defined.

Details

Committed
crtrott <crtrott@sandia.gov>Dec 10 2015, 19:48
Pushed
jungeOct 6 2016, 16:49
Parents
rLAMMPSc57fc903cf99: Kokkos: fix an issue with usage of DualView
Branches
Unknown
Tags
Unknown

Event Timeline

crtrott <crtrott@sandia.gov> committed rLAMMPS4099f540dd26: Fix an issue with usage of isfinite (authored by crtrott <crtrott@sandia.gov>).Dec 10 2015, 19:48