Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Basic Types

Platform-independent types. More...

Modules

 Specializations for numeric_traits
 The number traits class is specialized for number types defined in this API, such as mi::Uint32 and mi::Float64.
 

Namespaces

 mi::base
 Namespace for the Base API.
 

Macros

#define MI_BASE_FMT_MI_SINT64   "lld"
 The printf format specifier for mi::Sint64. More...
 
#define MI_BASE_FMT_MI_UINT64   "llu"
 The printf format specifier for mi::Uint64. More...
 
#define MI_BASE_FMT_MI_SIZE   "llu"
 The printf format specifier for mi::Size. More...
 
#define MI_BASE_FMT_MI_DIFFERENCE   "lld"
 The printf format specifier for mi::Difference. More...
 
#define MI_PI   3.14159265358979323846
 Value of Pi. More...
 
#define MI_PI_2   1.57079632679489661923
 Value of Pi / 2. More...
 
#define MI_PI_4   0.78539816339744830962
 Value of Pi / 4. More...
 

Typedefs

typedef signed char mi::Sint8
 8-bit signed integer. More...
 
typedef signed short mi::Sint16
 16-bit signed integer. More...
 
typedef signed int mi::Sint32
 32-bit signed integer. More...
 
typedef unsigned char mi::Uint8
 8-bit unsigned integer. More...
 
typedef unsigned short mi::Uint16
 16-bit unsigned integer. More...
 
typedef unsigned int mi::Uint32
 32-bit unsigned integer. More...
 
typedef float mi::Float32
 32-bit float. More...
 
typedef double mi::Float64
 64-bit float. More...
 
typedef long long mi::Sint64
 64-bit signed integer. More...
 
typedef unsigned long long mi::Uint64
 64-bit unsigned integer. More...
 
typedef Uint64 mi::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. More...
 
typedef Sint64 mi::Difference
 Signed integral type that is large enough to hold the difference of two pointers. More...
 

Enumerations

enum  mi::Comparison_result {
  mi::NEGATIVE = -1,
  mi::ZERO = 0,
  mi::POSITIVE = 1,
  mi::LESS = -1,
  mi::EQUAL = 0,
  mi::GREATER = 1
}
 An enum for a three-valued comparison result. More...
 

Functions

Comparison_result mi::operator- (Comparison_result sign)
 Reverses the sign of a three valued enum. More...
 
template<typename T >
Comparison_result mi::three_valued_sign (T t)
 Returns the three valued sign for a numerical type T. More...
 
template<typename T >
Comparison_result mi::three_valued_compare (T lhs, T rhs)
 Returns the three valued comparison result between two values of a numerical type T. More...
 

Variables

static const Size mi::SIZE_MAX_VALUE = 18446744073709551615ULL
 The maximum value for Size. More...
 
static const Difference mi::DIFFERENCE_MIN_VALUE = -9223372036854775807LL - 1LL
 The minimum value for Difference. More...
 
static const Difference mi::DIFFERENCE_MAX_VALUE = 9223372036854775807LL
 The maximum value for Difference. More...
 

Detailed Description

Platform-independent types.

Include File:
#include <mi/base/types.h>

Macro Definition Documentation

#define MI_BASE_FMT_MI_DIFFERENCE   "lld"

The printf format specifier for mi::Difference.

printf( "x equals %" MI_BASE_FMT_MI_DIFFERENCE " \n", x);
#define MI_BASE_FMT_MI_SINT64   "lld"

The printf format specifier for mi::Sint64.

mi::Sint64 x = ...;
printf( "x equals %" MI_BASE_FMT_MI_SINT64 " \n", x);
#define MI_BASE_FMT_MI_SIZE   "llu"

The printf format specifier for mi::Size.

mi::Size x = ...;
printf( "x equals %" MI_BASE_FMT_MI_SIZE " \n", x);
#define MI_BASE_FMT_MI_UINT64   "llu"

The printf format specifier for mi::Uint64.

mi::Uint64 x = ...;
printf( "x equals %" MI_BASE_FMT_MI_UINT64 " \n", x);
#define MI_PI   3.14159265358979323846

Value of Pi.

#define MI_PI_2   1.57079632679489661923

Value of Pi / 2.

#define MI_PI_4   0.78539816339744830962

Value of Pi / 4.

Typedef Documentation

typedef Sint64 mi::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.

typedef float mi::Float32

32-bit float.

typedef double mi::Float64

64-bit float.

typedef signed short mi::Sint16

16-bit signed integer.

typedef signed int mi::Sint32

32-bit signed integer.

typedef long long mi::Sint64

64-bit signed integer.

typedef signed char mi::Sint8

8-bit signed integer.

typedef Uint64 mi::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.

typedef unsigned short mi::Uint16

16-bit unsigned integer.

typedef unsigned int mi::Uint32

32-bit unsigned integer.

typedef unsigned long long mi::Uint64

64-bit unsigned integer.

typedef unsigned char mi::Uint8

8-bit unsigned integer.

Enumeration Type Documentation

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.

Function Documentation

Comparison_result mi::operator- ( Comparison_result  sign)
inline

Reverses the sign of a three valued enum.

template<typename T >
Comparison_result mi::three_valued_compare ( lhs,
rhs 
)
inline

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.
template<typename T >
Comparison_result mi::three_valued_sign ( t)
inline

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.

Variable Documentation

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.
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.
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.