HDK
|
#include "SYS_Compiler.h"
#include "SYS_Inline.h"
#include <limits>
#include <float.h>
#include <sys/types.h>
#include "fpreal16.h"
#include "SYS_Decimal128.h"
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 std::numeric_limits<int8>::min() |
#define | SYS_INT8_MAX std::numeric_limits<int8>::max() |
#define | SYS_UINT8_MAX std::numeric_limits<uint8>::max() |
#define | SYS_INT16_MIN std::numeric_limits<int16>::min() |
#define | SYS_INT16_MAX std::numeric_limits<int16>::max() |
#define | SYS_UINT16_MAX std::numeric_limits<uint16>::max() |
#define | SYS_INT32_MIN std::numeric_limits<int32>::min() |
#define | SYS_INT32_MAX std::numeric_limits<int32>::max() |
#define | SYS_UINT32_MAX std::numeric_limits<uint32>::max() |
#define | SYS_INT64_MIN std::numeric_limits<int64>::min() |
#define | SYS_INT64_MAX std::numeric_limits<int64>::max() |
#define | SYS_UINT64_MAX std::numeric_limits<uint64>::max() |
#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 std::numeric_limits<fpreal32>::epsilon() |
#define | SYS_FP64_EPSILON std::numeric_limits<fpreal64>::epsilon() |
#define | SYS_FP16_MIN ((fpreal16)H_REAL16_MIN) |
#define | SYS_FP32_MIN std::numeric_limits<fpreal32>::denorm_min() |
#define | SYS_FP64_MIN std::numeric_limits<fpreal64>::denorm_min() |
#define | SYS_FP16_MAX ((fpreal16)H_REAL16_MAX) |
#define | SYS_FP32_MAX std::numeric_limits<fpreal32>::max() |
#define | SYS_FP64_MAX std::numeric_limits<fpreal64>::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 | |
using | int8 = signed char |
using | uint8 = unsigned char |
using | int16 = short |
using | uint16 = unsigned short |
using | int32 = int |
using | uint32 = unsigned int |
using | uchar = unsigned char |
using | uint = unsigned int |
using | utf8 = char |
using | utf16 = unsigned short |
using | utf32 = unsigned int |
using | int64 = long long |
using | uint64 = unsigned long long |
using | exint = int64 |
using | fpreal32 = float |
using | fpreal64 = double |
using | fpreal = fpreal64 |
typedef union SYS_FPRealUnionT < fpreal > | SYS_FPRealUnionR |
typedef union SYS_FPRealUnionT < fpreal16 > | SYS_FPRealUnionH |
typedef union SYS_FPRealUnionT < fpreal32 > | SYS_FPRealUnionF |
typedef union SYS_FPRealUnionT < fpreal64 > | SYS_FPRealUnionD |
using | fpdec = SYS_Decimal128 |
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) |
#define CONST_FPREAL | ( | c | ) | ((fpreal)c) |
Definition at line 327 of file SYS_Types.h.
#define CONST_FPREAL16 | ( | c | ) | ((fpreal16)c) |
Definition at line 324 of file SYS_Types.h.
#define CONST_FPREAL32 | ( | c | ) | ((fpreal32)c) |
Definition at line 325 of file SYS_Types.h.
#define CONST_FPREAL64 | ( | c | ) | ((fpreal64)c) |
Definition at line 326 of file SYS_Types.h.
Definition at line 311 of file SYS_Types.h.
Definition at line 313 of file SYS_Types.h.
Definition at line 320 of file SYS_Types.h.
Definition at line 309 of file SYS_Types.h.
Definition at line 312 of file SYS_Types.h.
Definition at line 314 of file SYS_Types.h.
Definition at line 321 of file SYS_Types.h.
Definition at line 310 of file SYS_Types.h.
#define SYS_DBL_DIG 17 |
Definition at line 190 of file SYS_Types.h.
#define SYS_DBL_DIG_FMT SYS_DIG_FMT(SYS_DBL_DIG) |
Definition at line 297 of file SYS_Types.h.
#define SYS_DIG_FMT | ( | PREC | ) | SYS_DIG_FMT_INTERNAL(PREC) |
Definition at line 293 of file SYS_Types.h.
#define SYS_DIG_FMT_INTERNAL | ( | PREC | ) | "%." #PREC "g" |
Definition at line 292 of file SYS_Types.h.
#define SYS_EXINT_MAX SYS_INT64_MAX |
Definition at line 181 of file SYS_Types.h.
#define SYS_EXINT_MIN SYS_INT64_MIN |
Definition at line 180 of file SYS_Types.h.
#define SYS_FLT_DIG 9 |
Definition at line 191 of file SYS_Types.h.
#define SYS_FLT_DIG_FMT SYS_DIG_FMT(SYS_FLT_DIG) |
Definition at line 295 of file SYS_Types.h.
#define SYS_FP16_MAX ((fpreal16)H_REAL16_MAX) |
Definition at line 219 of file SYS_Types.h.
#define SYS_FP16_MIN ((fpreal16)H_REAL16_MIN) |
Definition at line 216 of file SYS_Types.h.
#define SYS_FP32_EPSILON std::numeric_limits<fpreal32>::epsilon() |
Definition at line 213 of file SYS_Types.h.
#define SYS_FP32_MAX std::numeric_limits<fpreal32>::max() |
Definition at line 220 of file SYS_Types.h.
#define SYS_FP32_MIN std::numeric_limits<fpreal32>::denorm_min() |
Definition at line 217 of file SYS_Types.h.
#define SYS_FP64_EPSILON std::numeric_limits<fpreal64>::epsilon() |
Definition at line 214 of file SYS_Types.h.
#define SYS_FP64_MAX std::numeric_limits<fpreal64>::max() |
Definition at line 221 of file SYS_Types.h.
#define SYS_FP64_MIN std::numeric_limits<fpreal64>::denorm_min() |
Definition at line 218 of file SYS_Types.h.
#define SYS_FPEPSILON SYS_FP64_EPSILON |
Definition at line 284 of file SYS_Types.h.
#define SYS_FPREAL_DIG SYS_DBL_DIG |
Definition at line 282 of file SYS_Types.h.
#define SYS_FPREAL_DIG_FMT SYS_DIG_FMT(SYS_FPREAL_DIG) |
Definition at line 299 of file SYS_Types.h.
#define SYS_FPREAL_MAX SYS_FP64_MAX |
Definition at line 286 of file SYS_Types.h.
#define SYS_FPREAL_MIN SYS_FP64_MIN |
Definition at line 285 of file SYS_Types.h.
#define SYS_FTOLERANCE ((fpreal32)0.00001) |
Definition at line 208 of file SYS_Types.h.
#define SYS_FTOLERANCE_D (fpreal64(SYS_FTOLERANCE)) |
Definition at line 209 of file SYS_Types.h.
#define SYS_FTOLERANCE_R (fpreal(SYS_FTOLERANCE)) |
Definition at line 283 of file SYS_Types.h.
#define SYS_INT16_MAX std::numeric_limits<int16>::max() |
Definition at line 166 of file SYS_Types.h.
#define SYS_INT16_MIN std::numeric_limits<int16>::min() |
Definition at line 165 of file SYS_Types.h.
#define SYS_INT32_MAX std::numeric_limits<int32>::max() |
Definition at line 171 of file SYS_Types.h.
#define SYS_INT32_MIN std::numeric_limits<int32>::min() |
Definition at line 170 of file SYS_Types.h.
Definition at line 155 of file SYS_Types.h.
#define SYS_INT64_MAX std::numeric_limits<int64>::max() |
Definition at line 176 of file SYS_Types.h.
#define SYS_INT64_MIN std::numeric_limits<int64>::min() |
Definition at line 175 of file SYS_Types.h.
#define SYS_INT8_MAX std::numeric_limits<int8>::max() |
Definition at line 161 of file SYS_Types.h.
#define SYS_INT8_MIN std::numeric_limits<int8>::min() |
Definition at line 160 of file SYS_Types.h.
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 468 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 469 of file SYS_Types.h.
#define SYS_PRI64_PREFIX "ll" |
Definition at line 72 of file SYS_Types.h.
#define SYS_PRId64 SYS_PRI64_PREFIX "d" |
Definition at line 76 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 447 of file SYS_Types.h.
#define SYS_PRIu64 SYS_PRI64_PREFIX "u" |
Definition at line 77 of file SYS_Types.h.
#define SYS_PRIx64 SYS_PRI64_PREFIX "x" |
Definition at line 78 of file SYS_Types.h.
#define SYS_PRIX64 SYS_PRI64_PREFIX "X" |
Definition at line 79 of file SYS_Types.h.
#define SYS_SCANF_FPREAL "lg" |
Definition at line 289 of file SYS_Types.h.
#define SYS_SIZEOF_FPREAL 8 |
Definition at line 280 of file SYS_Types.h.
#define SYS_UINT16_MAX std::numeric_limits<uint16>::max() |
Definition at line 167 of file SYS_Types.h.
#define SYS_UINT32_MAX std::numeric_limits<uint32>::max() |
Definition at line 172 of file SYS_Types.h.
Definition at line 156 of file SYS_Types.h.
#define SYS_UINT64_MAX std::numeric_limits<uint64>::max() |
Definition at line 177 of file SYS_Types.h.
#define SYS_UINT8_MAX std::numeric_limits<uint8>::max() |
Definition at line 162 of file SYS_Types.h.
Definition at line 125 of file SYS_Types.h.
using fpdec = SYS_Decimal128 |
Definition at line 474 of file SYS_Types.h.
Definition at line 277 of file SYS_Types.h.
Definition at line 200 of file SYS_Types.h.
using fpreal64 = double |
Definition at line 201 of file SYS_Types.h.
using int16 = short |
Definition at line 37 of file SYS_Types.h.
Definition at line 39 of file SYS_Types.h.
using int64 = long long |
Definition at line 116 of file SYS_Types.h.
using int8 = signed char |
Definition at line 35 of file SYS_Types.h.
typedef union SYS_FPRealUnionT< fpreal64 > SYS_FPRealUnionD |
Definition at line 428 of file SYS_Types.h.
typedef union SYS_FPRealUnionT< fpreal32 > SYS_FPRealUnionF |
Definition at line 427 of file SYS_Types.h.
typedef union SYS_FPRealUnionT< fpreal16 > SYS_FPRealUnionH |
Definition at line 426 of file SYS_Types.h.
typedef union SYS_FPRealUnionT< fpreal > SYS_FPRealUnionR |
Definition at line 425 of file SYS_Types.h.
using uchar = unsigned char |
Definition at line 42 of file SYS_Types.h.
Definition at line 45 of file SYS_Types.h.
using uint16 = unsigned short |
Definition at line 38 of file SYS_Types.h.
Definition at line 40 of file SYS_Types.h.
using uint64 = unsigned long long |
Definition at line 117 of file SYS_Types.h.
using uint8 = unsigned char |
Definition at line 36 of file SYS_Types.h.
using utf16 = unsigned short |
Definition at line 56 of file SYS_Types.h.
Definition at line 58 of file SYS_Types.h.
using utf8 = char |
Definition at line 52 of file SYS_Types.h.
enum SYS_EmptyConstructor |
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 435 of file SYS_Types.h.
SYS_FORCE_INLINE T* SYSconst_cast | ( | const T * | foo | ) |
Definition at line 136 of file SYS_Types.h.
SYS_FORCE_INLINE T& SYSconst_cast | ( | const T & | foo | ) |
Definition at line 143 of file SYS_Types.h.