Platform-independent types.
More...
|
| namespace | mi::base |
| | Namespace for the Base API.
|
| |
Platform-independent types.
- Include File:
#include <mi/base/types.h>
◆ MI_BASE_FMT_MI_DIFFERENCE
| #define MI_BASE_FMT_MI_DIFFERENCE "lld" |
The printf format specifier for mi::Difference.
#define MI_BASE_FMT_MI_DIFFERENCE
The printf format specifier for mi::Difference.
Definition: types.h:184
Sint64 Difference
Signed integral type that is large enough to hold the difference of two pointers.
Definition: types.h:122
◆ MI_BASE_FMT_MI_SINT64
| #define MI_BASE_FMT_MI_SINT64 "lld" |
The printf format specifier for mi::Sint64.
#define MI_BASE_FMT_MI_SINT64
The printf format specifier for mi::Sint64.
Definition: types.h:89
long long Sint64
64-bit signed integer.
Definition: types.h:61
◆ MI_BASE_FMT_MI_SIZE
| #define MI_BASE_FMT_MI_SIZE "llu" |
The printf format specifier for mi::Size.
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
#define MI_BASE_FMT_MI_SIZE
The printf format specifier for mi::Size.
Definition: types.h:172
◆ MI_BASE_FMT_MI_UINT64
| #define MI_BASE_FMT_MI_UINT64 "llu" |
The printf format specifier for mi::Uint64.
unsigned long long Uint64
64-bit unsigned integer.
Definition: types.h:62
#define MI_BASE_FMT_MI_UINT64
The printf format specifier for mi::Uint64.
Definition: types.h:101
◆ MI_PI
| #define MI_PI 3.14159265358979323846 |
◆ MI_PI_2
| #define MI_PI_2 1.57079632679489661923 |
◆ MI_PI_4
| #define MI_PI_4 0.78539816339744830962 |
◆ Difference
Signed integral type that is large enough to hold the difference of two pointers.
It corresponds to a 32-bit signed integer on 32-bit architectures and a 64-bit signed integer on 64-bit architectures.
◆ Float32
◆ Float64
◆ Sint16
◆ Sint32
◆ Sint64
◆ Sint8
◆ Size
Unsigned integral type that is large enough to hold the size of all types.
This type is for example used for dimensions and indices of vectors.
It corresponds to a 32-bit unsigned integer on 32-bit architectures and a 64-bit unsigned integer on 64-bit architectures.
◆ Uint16
◆ Uint32
◆ Uint64
◆ Uint8
◆ Comparison_result
An enum for a three-valued comparison result.
The three values, -1, 0, and 1, have several symbolic names that can be used interchangeable depending on the context. The symbolic names group together as indicated in their order.
| Enumerator |
|---|
| NEGATIVE | = -1. Sign of a value is negative.
|
| ZERO | = 0. Value is zero.
|
| POSITIVE | = +1. Sign of a value is positive.
|
| LESS | = -1. First value is less than second value.
|
| EQUAL | = 0. First value is equal to second value.
|
| GREATER | = +1. First value is greater than second value.
|
◆ binary_cast()
template<class Target , class Source>
| Target mi::base::binary_cast |
( |
Source const & |
val | ) |
|
|
inline |
Cast an immutable 'Source' value to an immutable 'Target' value.
Use this function as follows:
float fval( 0.0f );
Uint32 uval( binary_cast<Uint32>(fval) );
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
◆ operator-()
Reverses the sign of a three valued enum.
◆ three_valued_compare()
Returns the three valued comparison result between two values of a numerical type T.
- Precondition
- Values of type
T must be comparable.
- Note
- The result of this function is undefined if
lhs or rhs is NaN.
◆ three_valued_sign()
Returns the three valued sign for a numerical type T.
- Precondition
- The value of type
T must be comparable against 0.
- Note
- The result of this function is undefined if
t is NaN.
◆ DIFFERENCE_MAX_VALUE
| const Difference mi::DIFFERENCE_MAX_VALUE = 9223372036854775807LL |
|
static |
The maximum value for Difference.
- Note
- The actual value of this constant depends on the architecture. Possible values are 9223372036854775807 on 64-bit architectures and 2147483647 on 32-bit architectures.
◆ DIFFERENCE_MIN_VALUE
| const Difference mi::DIFFERENCE_MIN_VALUE = -9223372036854775807LL - 1LL |
|
static |
The minimum value for Difference.
- Note
- The actual value of this constant depends on the architecture. Possible values are -9223372036854775808 on 64-bit architectures and -2147483648 on 32-bit architectures.
◆ SIZE_MAX_VALUE
| const Size mi::SIZE_MAX_VALUE = 18446744073709551615ULL |
|
static |
The maximum value for Size.
- Note
- The actual value of this constant depends on the architecture. Possible values are 18446744073709551615 on 64-bit architectures and 4294967295 on 32-bit architectures.