HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_Types.h File Reference
#include "SYS_Compiler.h"
#include "SYS_Inline.h"
#include <limits>
#include <float.h>
#include <sys/types.h>
#include "SYS_Decimal128.h"
+ Include dependency graph for SYS_Types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SYS_Types< T >
 
struct  SYS_Types< int32 >
 
struct  SYS_Types< int64 >
 
struct  SYS_Types< fpreal32 >
 
struct  SYS_Types< fpreal64 >
 
union  SYS_FPRealUnionT< T >
 
union  SYS_FPRealUnionT< fpreal16 >
 
union  SYS_FPRealUnionT< fpreal32 >
 
union  SYS_FPRealUnionT< fpreal64 >
 

Macros

#define SYS_PRI64_PREFIX   "ll"
 
#define SYS_PRId64   SYS_PRI64_PREFIX "d"
 
#define SYS_PRIu64   SYS_PRI64_PREFIX "u"
 
#define SYS_PRIx64   SYS_PRI64_PREFIX "x"
 
#define SYS_PRIX64   SYS_PRI64_PREFIX "X"
 
#define SYS_INT64_C(x)   x ## LL
 
#define SYS_UINT64_C(x)   x ## ULL
 
#define SYS_INT8_MIN   (-128)
 
#define SYS_INT8_MAX   (127)
 
#define SYS_UINT8_MAX   (255)
 
#define SYS_INT16_MIN   (-32767-1)
 
#define SYS_INT16_MAX   (32767)
 
#define SYS_UINT16_MAX   (65535)
 
#define SYS_INT32_MIN   (-2147483647-1)
 
#define SYS_INT32_MAX   (2147483647)
 
#define SYS_UINT32_MAX   (4294967295U)
 
#define SYS_INT64_MIN   (-SYS_INT64_C(9223372036854775807)-1)
 
#define SYS_INT64_MAX   (SYS_INT64_C(9223372036854775807))
 
#define SYS_UINT64_MAX   (SYS_UINT64_C(18446744073709551615))
 
#define SYS_EXINT_MIN   SYS_INT64_MIN
 
#define SYS_EXINT_MAX   SYS_INT64_MAX
 
#define SYS_DBL_DIG   17
 
#define SYS_FLT_DIG   9
 
#define SYS_FTOLERANCE   ((fpreal32)0.00001)
 
#define SYS_FTOLERANCE_D   (fpreal64(SYS_FTOLERANCE))
 
#define SYS_FP32_EPSILON   FLT_EPSILON
 
#define SYS_FP64_EPSILON   DBL_EPSILON
 
#define SYS_FP32_MIN   ((fpreal32)2e-45)
 
#define SYS_FP64_MIN   ((fpreal64)2e-324)
 
#define SYS_FP32_MAX   ((fpreal32)FLT_MAX)
 
#define SYS_FP64_MAX   ((fpreal64)DBL_MAX)
 
#define SYS_SIZEOF_FPREAL   8
 
#define SYS_FPREAL_DIG   SYS_DBL_DIG
 
#define SYS_FTOLERANCE_R   (fpreal(SYS_FTOLERANCE))
 
#define SYS_FPEPSILON   SYS_FP64_EPSILON
 
#define SYS_FPREAL_MIN   SYS_FP64_MIN
 
#define SYS_FPREAL_MAX   SYS_FP64_MAX
 
#define SYS_SCANF_FPREAL   "lg"
 
#define SYS_DIG_FMT_INTERNAL(PREC)   "%." #PREC "g"
 
#define SYS_DIG_FMT(PREC)   SYS_DIG_FMT_INTERNAL(PREC)
 
#define SYS_FLT_DIG_FMT   SYS_DIG_FMT(SYS_FLT_DIG)
 
#define SYS_DBL_DIG_FMT   SYS_DIG_FMT(SYS_DBL_DIG)
 
#define SYS_FPREAL_DIG_FMT   SYS_DIG_FMT(SYS_FPREAL_DIG)
 
#define CONST_INT8(x)   ((int8)x)
 
#define CONST_UINT8(x)   ((uint8)x)
 
#define CONST_INT16(x)   ((int16)x)
 
#define CONST_UINT16(x)   ((uint16)x)
 
#define CONST_INT32(x)   ((int32)x)
 
#define CONST_UINT32(x)   ((uint32)x)
 
#define CONST_INT64(x)   (x##LL)
 
#define CONST_UINT64(x)   (x##LL)
 
#define CONST_FPREAL16(c)   ((fpreal16)c)
 
#define CONST_FPREAL32(c)   ((fpreal32)c)
 
#define CONST_FPREAL64(c)   ((fpreal64)c)
 
#define CONST_FPREAL(c)   ((fpreal)c)
 
#define SYS_PRINTF_CHECK_ATTRIBUTE(string_index, first_to_check)
 
#define SYS_PACKED_STRUCT_HINT_BEGIN(name, n)   struct name
 
#define SYS_PACKED_STRUCT_HINT_END
 

Typedefs

typedef signed char int8
 
typedef unsigned char uint8
 
typedef short int16
 
typedef unsigned short uint16
 
typedef int int32
 
typedef unsigned int uint32
 
typedef unsigned char uchar
 
typedef unsigned int uint
 
typedef char utf8
 
typedef unsigned short utf16
 
typedef unsigned int utf32
 
typedef long long int64
 
typedef unsigned long long uint64
 
typedef int64 exint
 
typedef float fpreal32
 
typedef double fpreal64
 
typedef unsigned short fpreal16
 
typedef double fpreal
 
typedef union SYS_FPRealUnionT
< fpreal
SYS_FPRealUnionR
 
typedef union SYS_FPRealUnionT
< fpreal32
SYS_FPRealUnionF
 
typedef union SYS_FPRealUnionT
< fpreal64
SYS_FPRealUnionD
 
typedef SYS_Decimal128 fpdec
 

Enumerations

enum  SYS_EmptyConstructor { SYS_EMPTY_CONSTRUCTOR }
 

Functions

template<typename T >
SYS_FORCE_INLINE T * SYSconst_cast (const T *foo)
 
template<typename T >
SYS_FORCE_INLINE T & SYSconst_cast (const T &foo)
 

Macro Definition Documentation

#define CONST_FPREAL (   c)    ((fpreal)c)

Definition at line 320 of file SYS_Types.h.

#define CONST_FPREAL16 (   c)    ((fpreal16)c)

Definition at line 317 of file SYS_Types.h.

#define CONST_FPREAL32 (   c)    ((fpreal32)c)

Definition at line 318 of file SYS_Types.h.

#define CONST_FPREAL64 (   c)    ((fpreal64)c)

Definition at line 319 of file SYS_Types.h.

#define CONST_INT16 (   x)    ((int16)x)

Definition at line 304 of file SYS_Types.h.

#define CONST_INT32 (   x)    ((int32)x)

Definition at line 306 of file SYS_Types.h.

#define CONST_INT64 (   x)    (x##LL)

Definition at line 313 of file SYS_Types.h.

#define CONST_INT8 (   x)    ((int8)x)

Definition at line 302 of file SYS_Types.h.

#define CONST_UINT16 (   x)    ((uint16)x)

Definition at line 305 of file SYS_Types.h.

#define CONST_UINT32 (   x)    ((uint32)x)

Definition at line 307 of file SYS_Types.h.

#define CONST_UINT64 (   x)    (x##LL)

Definition at line 314 of file SYS_Types.h.

#define CONST_UINT8 (   x)    ((uint8)x)

Definition at line 303 of file SYS_Types.h.

#define SYS_DBL_DIG   17

Definition at line 181 of file SYS_Types.h.

#define SYS_DBL_DIG_FMT   SYS_DIG_FMT(SYS_DBL_DIG)

Definition at line 290 of file SYS_Types.h.

#define SYS_DIG_FMT (   PREC)    SYS_DIG_FMT_INTERNAL(PREC)

Definition at line 286 of file SYS_Types.h.

#define SYS_DIG_FMT_INTERNAL (   PREC)    "%." #PREC "g"

Definition at line 285 of file SYS_Types.h.

#define SYS_EXINT_MAX   SYS_INT64_MAX

Definition at line 172 of file SYS_Types.h.

#define SYS_EXINT_MIN   SYS_INT64_MIN

Definition at line 171 of file SYS_Types.h.

#define SYS_FLT_DIG   9
Examples:
standalone/geo2voxel.C.

Definition at line 182 of file SYS_Types.h.

#define SYS_FLT_DIG_FMT   SYS_DIG_FMT(SYS_FLT_DIG)

Definition at line 288 of file SYS_Types.h.

#define SYS_FP32_EPSILON   FLT_EPSILON

Definition at line 208 of file SYS_Types.h.

#define SYS_FP32_MAX   ((fpreal32)FLT_MAX)

Definition at line 213 of file SYS_Types.h.

#define SYS_FP32_MIN   ((fpreal32)2e-45)

Definition at line 211 of file SYS_Types.h.

#define SYS_FP64_EPSILON   DBL_EPSILON

Definition at line 209 of file SYS_Types.h.

#define SYS_FP64_MAX   ((fpreal64)DBL_MAX)

Definition at line 214 of file SYS_Types.h.

#define SYS_FP64_MIN   ((fpreal64)2e-324)

Definition at line 212 of file SYS_Types.h.

#define SYS_FPEPSILON   SYS_FP64_EPSILON

Definition at line 277 of file SYS_Types.h.

#define SYS_FPREAL_DIG   SYS_DBL_DIG

Definition at line 275 of file SYS_Types.h.

#define SYS_FPREAL_DIG_FMT   SYS_DIG_FMT(SYS_FPREAL_DIG)

Definition at line 292 of file SYS_Types.h.

#define SYS_FPREAL_MAX   SYS_FP64_MAX

Definition at line 279 of file SYS_Types.h.

#define SYS_FPREAL_MIN   SYS_FP64_MIN

Definition at line 278 of file SYS_Types.h.

#define SYS_FTOLERANCE   ((fpreal32)0.00001)

Definition at line 203 of file SYS_Types.h.

#define SYS_FTOLERANCE_D   (fpreal64(SYS_FTOLERANCE))

Definition at line 204 of file SYS_Types.h.

#define SYS_FTOLERANCE_R   (fpreal(SYS_FTOLERANCE))

Definition at line 276 of file SYS_Types.h.

#define SYS_INT16_MAX   (32767)

Definition at line 157 of file SYS_Types.h.

#define SYS_INT16_MIN   (-32767-1)

Definition at line 156 of file SYS_Types.h.

#define SYS_INT32_MAX   (2147483647)

Definition at line 162 of file SYS_Types.h.

#define SYS_INT32_MIN   (-2147483647-1)

Definition at line 161 of file SYS_Types.h.

#define SYS_INT64_C (   x)    x ## LL

Definition at line 146 of file SYS_Types.h.

#define SYS_INT64_MAX   (SYS_INT64_C(9223372036854775807))

Definition at line 167 of file SYS_Types.h.

#define SYS_INT64_MIN   (-SYS_INT64_C(9223372036854775807)-1)

Definition at line 166 of file SYS_Types.h.

#define SYS_INT8_MAX   (127)

Definition at line 152 of file SYS_Types.h.

#define SYS_INT8_MIN   (-128)

Definition at line 151 of file SYS_Types.h.

#define SYS_PACKED_STRUCT_HINT_BEGIN (   name,
  n 
)    struct name

Struct modifiers

Note that these qualifiers can only appear in struct declarations.Compiler hint to pack the struct with the specified alignment. Note this is not supported on some platforms and is only a hint.

Definition at line 447 of file SYS_Types.h.

#define SYS_PACKED_STRUCT_HINT_END

Struct modifiers

Note that these qualifiers can only appear in struct declarations.Compiler hint to pack the struct with the specified alignment. Note this is not supported on some platforms and is only a hint.

Definition at line 448 of file SYS_Types.h.

#define SYS_PRI64_PREFIX   "ll"

Definition at line 63 of file SYS_Types.h.

#define SYS_PRId64   SYS_PRI64_PREFIX "d"
Examples:
field3d/f3d_io.C, GEO/GEO_VoxelTranslator.C, and standalone/geo2voxel.C.

Definition at line 67 of file SYS_Types.h.

#define SYS_PRINTF_CHECK_ATTRIBUTE (   string_index,
  first_to_check 
)

Mark a function as doing printf-style formatting, and generate warnings if the formatting string doesn't match the types. string_index is the parameter index of the format string, and first_to_check is the index of the "..." parameter. These indices are both base 1, and "this" counts as the first parameter if it's a method.

Definition at line 426 of file SYS_Types.h.

#define SYS_PRIu64   SYS_PRI64_PREFIX "u"

Definition at line 68 of file SYS_Types.h.

#define SYS_PRIx64   SYS_PRI64_PREFIX "x"

Definition at line 69 of file SYS_Types.h.

#define SYS_PRIX64   SYS_PRI64_PREFIX "X"

Definition at line 70 of file SYS_Types.h.

#define SYS_SCANF_FPREAL   "lg"

Definition at line 282 of file SYS_Types.h.

#define SYS_SIZEOF_FPREAL   8

Definition at line 273 of file SYS_Types.h.

#define SYS_UINT16_MAX   (65535)

Definition at line 158 of file SYS_Types.h.

#define SYS_UINT32_MAX   (4294967295U)

Definition at line 163 of file SYS_Types.h.

#define SYS_UINT64_C (   x)    x ## ULL

Definition at line 147 of file SYS_Types.h.

#define SYS_UINT64_MAX   (SYS_UINT64_C(18446744073709551615))

Definition at line 168 of file SYS_Types.h.

#define SYS_UINT8_MAX   (255)

Definition at line 153 of file SYS_Types.h.

Typedef Documentation

Definition at line 453 of file SYS_Types.h.

typedef unsigned short fpreal16

Definition at line 198 of file SYS_Types.h.

typedef float fpreal32

Definition at line 191 of file SYS_Types.h.

typedef double fpreal64
Examples:
SOP/SOP_IKSample.C.

Definition at line 192 of file SYS_Types.h.

typedef short int16

Definition at line 33 of file SYS_Types.h.

typedef int int32

Definition at line 35 of file SYS_Types.h.

typedef long long int64
typedef signed char int8

Definition at line 31 of file SYS_Types.h.

Definition at line 406 of file SYS_Types.h.

Definition at line 405 of file SYS_Types.h.

Definition at line 404 of file SYS_Types.h.

typedef unsigned char uchar

Definition at line 38 of file SYS_Types.h.

typedef unsigned int uint

Definition at line 40 of file SYS_Types.h.

typedef unsigned short uint16

Definition at line 34 of file SYS_Types.h.

typedef unsigned int uint32

Definition at line 36 of file SYS_Types.h.

typedef unsigned long long uint64

Definition at line 108 of file SYS_Types.h.

typedef unsigned char uint8

Definition at line 32 of file SYS_Types.h.

typedef unsigned short utf16

Definition at line 48 of file SYS_Types.h.

typedef unsigned int utf32

Definition at line 49 of file SYS_Types.h.

typedef char utf8

Definition at line 47 of file SYS_Types.h.

Enumeration Type Documentation

Special enum to disambiguate default constructors from empty constructors. This can be handy for constructing static objects that do not need to be explicitly constructed but are safe to use if all members are initialized to zero upon DSO load (e.g. their storage is defined by the .bss section in ELF files).

Enumerator
SYS_EMPTY_CONSTRUCTOR 

Definition at line 414 of file SYS_Types.h.

Function Documentation

template<typename T >
SYS_FORCE_INLINE T* SYSconst_cast ( const T *  foo)

Definition at line 127 of file SYS_Types.h.

template<typename T >
SYS_FORCE_INLINE T& SYSconst_cast ( const T &  foo)

Definition at line 134 of file SYS_Types.h.