OpendTect  6.6
Classes | Namespaces | Macros | Functions
undefval.h File Reference
Include dependency graph for undefval.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Values::Undef< T >
 Templatized undefined values. More...
 
class  Values::Undef< short >
 Undefined od_int16. More...
 
class  Values::Undef< unsigned short >
 Undefined od_uint16. More...
 
class  Values::Undef< int >
 Undefined od_int32. More...
 
class  Values::Undef< unsigned int >
 Undefined od_uint32. More...
 
class  Values::Undef< int64_t >
 Undefined od_int64. More...
 
class  Values::Undef< uint64_t >
 Undefined od_uint64. More...
 
class  Values::Undef< bool >
 Undefined bool. More...
 
class  Values::Undef< float >
 Undefined float. More...
 
class  Values::Undef< double >
 Undefined double. More...
 
class  Values::Undef< const char * >
 Undefined const char*. More...
 
class  Values::Undef< char * >
 Undefined char*. More...
 
class  Values::Undef< char >
 Undefined char. More...
 

Namespaces

 Values
 Templatized undefined and initialisation (i.e. null) values.
 

Macros

#define __mUndefDValue   1e30
 Undefined value. IEEE gives NaN but that's not exactly what we want. More...
 
#define __mUndefFValue   1e30f
 
#define __mIsUndefinedD(x)   (((x)>9.99999e29)&&((x)<1.00001e30))
 Check on undefined. Also works when double converted to float and vv. More...
 
#define __mIsUndefinedF(x)   (((x)>9.99999e29f)&&((x)<1.00001e30f))
 
#define __mIsUndefinedI(x, udfval)   (((x)>=udfval)||((x)<=-udfval))
 
#define __mUndefIntVal   2109876543
 Almost MAXINT so unlikely, but not MAXINT to avoid that. More...
 
#define __mUndefIntVal64   9223344556677889900LL
 Almost MAXINT64 therefore unlikely. More...
 
#define mUdf(type)   Values::Undef<type>::val()
 Use this macro to get the undefined for simple types. More...
 
#define mSetUdf(val)   Values::setUdf(val)
 Use this macro to set simple types to undefined. More...
 
#define mIsUdf(val)   isUdfImpl(val)
 Use mIsUdf to check for undefinedness of simple types. More...
 
#define mFastMaxReasonableFloat   1e20f
 
#define mFastIsFloatDefined(fval)
 

Functions

template<class T >
bool Values::isUdf (const T &t)
 
template<class T >
const T & Values::udfVal (const T &)
 
template<class T >
bool Values::hasUdf ()
 
template<class T >
T & Values::setUdf (T &u)
 
template<class T >
bool isUdfImpl (T val)
 
bool isUdfImpl (float)
 
bool isUdfImpl (double)
 

Macro Definition Documentation

◆ __mIsUndefinedD

#define __mIsUndefinedD (   x)    (((x)>9.99999e29)&&((x)<1.00001e30))

Check on undefined. Also works when double converted to float and vv.

◆ __mIsUndefinedF

#define __mIsUndefinedF (   x)    (((x)>9.99999e29f)&&((x)<1.00001e30f))

◆ __mIsUndefinedI

#define __mIsUndefinedI (   x,
  udfval 
)    (((x)>=udfval)||((x)<=-udfval))

◆ __mUndefDValue

#define __mUndefDValue   1e30

Undefined value. IEEE gives NaN but that's not exactly what we want.

◆ __mUndefFValue

#define __mUndefFValue   1e30f

◆ __mUndefIntVal

#define __mUndefIntVal   2109876543

Almost MAXINT so unlikely, but not MAXINT to avoid that.

◆ __mUndefIntVal64

#define __mUndefIntVal64   9223344556677889900LL

Almost MAXINT64 therefore unlikely.

◆ mFastIsFloatDefined

#define mFastIsFloatDefined (   fval)
Value:

◆ mFastMaxReasonableFloat

#define mFastMaxReasonableFloat   1e20f

Only use this macro if speed really counts, e.g. when doing relatively simple operations on a huge range of data elements in a parallel task. It minimizes slowness from function calls and Math::IsNormalNumber(.). (eventual NaNs in C++ comparisons are said to return always false)

◆ mIsUdf

#define mIsUdf (   val)    isUdfImpl(val)

Use mIsUdf to check for undefinedness of simple types.

◆ mSetUdf

#define mSetUdf (   val)    Values::setUdf(val)

Use this macro to set simple types to undefined.

◆ mUdf

#define mUdf (   type)    Values::Undef<type>::val()

Use this macro to get the undefined for simple types.

Function Documentation

◆ isUdfImpl() [1/3]

bool isUdfImpl ( double  )

◆ isUdfImpl() [2/3]

bool isUdfImpl ( float  )

◆ isUdfImpl() [3/3]

template<class T >
bool isUdfImpl ( val)
inline
Math::IsNormalNumber
bool IsNormalNumber(float)
__mIsUndefinedF
#define __mIsUndefinedF(x)
Definition: undefval.h:22
mFastMaxReasonableFloat
#define mFastMaxReasonableFloat
Definition: undefval.h:296

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2021