OpendTect-6_4  6.4
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 __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 &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

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

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

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

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

#define __mUndefFValue   1e30f
#define __mUndefIntVal   2109876543

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

#define __mUndefIntVal64   9223344556677889900LL

Almost MAXINT64 therefore unlikely.

#define mFastIsFloatDefined (   fval)
Value:
#define mFastMaxReasonableFloat
Definition: undefval.h:294
#define __mIsUndefinedF(x)
Definition: undefval.h:23
bool IsNormalNumber(float)
#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)

#define mIsUdf (   val)    isUdfImpl(val)

Use mIsUdf to check for undefinedness of simple types.

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

Use this macro to set simple types to undefined.

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

Use this macro to get the undefined for simple types.

Function Documentation

template<class T >
bool isUdfImpl ( val)
inline
bool isUdfImpl ( float  )
bool isUdfImpl ( double  )

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