Changeset 24313 for issm/trunk/src/c/shared/Numerics/isnan.h
- Timestamp:
- 11/01/19 12:01:57 (5 years ago)
- Location:
- issm/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/c
- Property svn:ignore
-
issm/trunk/src/c/shared/Numerics/isnan.h
r23394 r24313 1 /*!\file: isnan.h2 * \brief: only used for intel compiler.3 */4 5 1 #ifndef _XISNAN_H_ 6 2 #define _XISNAN_H_ … … 12 8 #endif 13 9 14 /* If include cmath instead of math, isnan on linux64 murdo does not work:*/10 /*cmath defines isnan and isinf*/ 15 11 #include <cmath> 16 12 17 template <class T> int xIsNan(const T& X) {18 13 #ifdef _INTEL_WIN_ 19 return (X!=X)?1:0; 14 template <class T> int xIsNan(const T& X){return (X!=X)?1:0;} 20 15 #else 21 return std::isnan(X); 16 template <class T> int xIsNan(const T& X){return std::isnan(X); } 22 17 #endif 23 }18 template <class T> int xIsInf(const T& X){return std::isinf(X); } 24 19 25 template <class T> int xIsInf(const T& X) { 26 return std::isinf(X); 27 } 20 /*Special overloading definitions for AD*/ 28 21 29 22 #if defined(_HAVE_ADOLC_) && !defined(_WRAPPERS_)
Note:
See TracChangeset
for help on using the changeset viewer.