Changeset 12527


Ignore:
Timestamp:
06/25/12 12:10:34 (13 years ago)
Author:
utke
Message:

templatized isnan

Location:
issm/trunk-jpl/src/c/shared/Numerics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/shared/Numerics/isnan.cpp

    r12476 r12527  
    22#ifdef _INTEL_WIN_
    33
    4 int isnan(IssmDouble x){
    5         if (x!=x)return 1;
    6         else return 0;
     4int isnan(IssmPDouble x){
     5        return (x!=x)?1:0;
    76}
    87#endif
  • issm/trunk-jpl/src/c/shared/Numerics/isnan.h

    r12476 r12527  
    77
    88#ifdef _INTEL_WIN_
    9 int isnan(IssmDouble X);
     9int isnan(IssmPDouble X);
    1010#endif
    1111
     12template <class T> int xIsNan(const T& X) {
     13    return isnan(X);
     14}
     15
     16#ifdef _HAVE_ADOLC_
     17template <> int xIsNan<adouble> (const adouble& X) {
     18  return isnan(X.getValue());
     19}
     20#endif
    1221#endif
    1322
Note: See TracChangeset for help on using the changeset viewer.