DiCE API nvidia_logo_transpbg.gif Up
Specializations for numeric_traits

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

Namespaces

namespace  mi::base
 Namespace for the Base API.
 

Classes

struct  mi::base::numeric_traits<Sint8>
 Numeric traits specialization for mi::Sint8. More...
 
struct  mi::base::numeric_traits<Sint16>
 Numeric traits specialization for mi::Sint16. More...
 
struct  mi::base::numeric_traits<Sint32>
 Numeric traits specialization for mi::Sint32. More...
 
struct  mi::base::numeric_traits<Sint64>
 Numeric traits specialization for mi::Sint64. More...
 
struct  mi::base::numeric_traits<Uint8>
 Numeric traits specialization for mi::Uint8. More...
 
struct  mi::base::numeric_traits<Uint16>
 Numeric traits specialization for mi::Uint16. More...
 
struct  mi::base::numeric_traits<Uint32>
 Numeric traits specialization for mi::Uint32. More...
 
struct  mi::base::numeric_traits<Uint64>
 Numeric traits specialization for mi::Uint64. More...
 
struct  mi::base::numeric_traits<Float32>
 Numeric traits specialization for mi::Float32. More...
 
struct  mi::base::numeric_traits<Float64>
 Numeric traits specialization for mi::Float64. More...
 

Functions

static T() mi::base::numeric_traits_base<T>::min () throw ()
 Returns the minimum finite value for T (and for floating point types the minimum positive value). More...
 
static T() mi::base::numeric_traits_base<T>::max () throw ()
 Returns the maximum finite value for T. More...
 
static T mi::base::numeric_traits_base<T>::negative_max () throw ()
 Returns the smallest finite negative value for T. More...
 
static T mi::base::numeric_traits_base<T>::infinity () throw ()
 Returns an infinity value for T, if one exists, and T() otherwise. More...
 
static T mi::base::numeric_traits_base<T>::quiet_NaN () throw ()
 Returns a quiet NaN value for T, if one exists, and T() otherwise. More...
 
static T mi::base::numeric_traits_base<T>::signaling_NaN () throw ()
 Returns a signaling NaN value for T, if one exists, and T() otherwise. More...
 
static Sint8() mi::base::numeric_traits<Sint8>::min () throw ()
 SCHAR_MIN. More...
 
static Sint8() mi::base::numeric_traits<Sint8>::max () throw ()
 SCHAR_MAX. More...
 
static Sint8 mi::base::numeric_traits<Sint8>::negative_max () throw ()
 SCHAR_MIN. More...
 
static Sint16() mi::base::numeric_traits<Sint16>::min () throw ()
 SHRT_MIN. More...
 
static Sint16() mi::base::numeric_traits<Sint16>::max () throw ()
 SHRT_MAX. More...
 
static Sint16 mi::base::numeric_traits<Sint16>::negative_max () throw ()
 SHRT_MIN. More...
 
static Sint32() mi::base::numeric_traits<Sint32>::min () throw ()
 INT_MIN. More...
 
static Sint32() mi::base::numeric_traits<Sint32>::max () throw ()
 INT_MAX. More...
 
static Sint32 mi::base::numeric_traits<Sint32>::negative_max () throw ()
 INT_MIN. More...
 
static Sint64() mi::base::numeric_traits<Sint64>::min () throw ()
 LLONG_MIN. More...
 
static Sint64() mi::base::numeric_traits<Sint64>::max () throw ()
 LLONG_MAX. More...
 
static Sint64 mi::base::numeric_traits<Sint64>::negative_max () throw ()
 LLONG_MIN. More...
 
static Uint8() mi::base::numeric_traits<Uint8>::max () throw ()
 UCHAR_MAX. More...
 
static Uint16() mi::base::numeric_traits<Uint16>::max () throw ()
 USHRT_MAX. More...
 
static Uint32() mi::base::numeric_traits<Uint32>::max () throw ()
 UINT_MAX. More...
 
static Uint64() mi::base::numeric_traits<Uint64>::max () throw ()
 ULLONG_MAX. More...
 
static Float32() mi::base::numeric_traits<Float32>::min () throw ()
 FLT_MIN. More...
 
static Float32() mi::base::numeric_traits<Float32>::max () throw ()
 FLT_MAX. More...
 
static Float32 mi::base::numeric_traits<Float32>::negative_max () throw ()
 -FLT_MAX More...
 
static Float64() mi::base::numeric_traits<Float64>::min () throw ()
 DBL_MIN. More...
 
static Float64() mi::base::numeric_traits<Float64>::max () throw ()
 DBL_MAX. More...
 
static Float64 mi::base::numeric_traits<Float64>::negative_max () throw ()
 -DBL_MAX More...
 

Variables

static const bool mi::base::numeric_traits_base<T>::is_specialized = false
 Constant that is true if and only if this traits is specialized for T. More...
 
static const bool mi::base::numeric_traits_base<T>::has_infinity = false
 Constant that is true if and only if T has an infinity representation. More...
 
static const bool mi::base::numeric_traits_base<T>::has_quiet_NaN = false
 Constant that is true if and only if T has a quiet NaN (not-a-number) representation. More...
 
static const bool mi::base::numeric_traits_base<T>::has_signaling_NaN = false
 Constant that is true if and only if T has a signaling NaN (not-a-number) representation. More...
 
static const bool mi::base::numeric_traits<Sint8>::is_specialized = true
 true for specialization. More...
 
static const bool mi::base::numeric_traits<Sint16>::is_specialized = true
 true for specialization. More...
 
static const bool mi::base::numeric_traits<Sint32>::is_specialized = true
 true for specialization. More...
 
static const bool mi::base::numeric_traits<Sint64>::is_specialized = true
 true for specialization. More...
 
static const bool mi::base::numeric_traits<Uint8>::is_specialized = true
 true for specialization. More...
 
static const bool mi::base::numeric_traits<Uint16>::is_specialized = true
 true for specialization. More...
 
static const bool mi::base::numeric_traits<Uint32>::is_specialized = true
 true for specialization. More...
 
static const bool mi::base::numeric_traits<Uint64>::is_specialized = true
 true for specialization. More...
 
static const bool mi::base::numeric_traits<Float32>::is_specialized = true
 true for specialization. More...
 
static const bool mi::base::numeric_traits<Float32>::has_infinity = true
 Has infinity value. More...
 
static const bool mi::base::numeric_traits<Float32>::has_quiet_NaN = true
 Has a quiet NaN value. More...
 
static const bool mi::base::numeric_traits<Float32>::has_signaling_NaN = true
 Has a signaling NaN value. More...
 
static const bool mi::base::numeric_traits<Float64>::is_specialized = true
 true for specialization. More...
 
static const bool mi::base::numeric_traits<Float64>::has_infinity = true
 Has infinity value. More...
 
static const bool mi::base::numeric_traits<Float64>::has_quiet_NaN = true
 Has a quiet NaN value. More...
 
static const bool mi::base::numeric_traits<Float64>::has_signaling_NaN = true
 Has a signaling NaN value. More...
 

Detailed Description

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

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

Function Documentation

 infinity()

template<typename T>
static T mi::base::numeric_traits_base<T>::infinity ( )
throw (
)
inlinestatic

Returns an infinity value for T, if one exists, and T() otherwise.

 max() [1/11]

template<typename T>
static T() mi::base::numeric_traits_base<T>::max ( )
throw (
)
inlinestatic

Returns the maximum finite value for T.

The value is equivalent to standard C constants CHAR_MAX, SHRT_MAX, FLT_MAX, DBL_MAX, etc.

Returns
the maximum finite value for T.

 max() [2/11]

static Sint8() mi::base::numeric_traits< Sint8 >::max ( )
throw (
)
inlinestatic
SCHAR_MAX.

 max() [3/11]

static Sint16() mi::base::numeric_traits< Sint16 >::max ( )
throw (
)
inlinestatic
SHRT_MAX.

 max() [4/11]

static Sint32() mi::base::numeric_traits< Sint32 >::max ( )
throw (
)
inlinestatic
INT_MAX.

 max() [5/11]

static Sint64() mi::base::numeric_traits< Sint64 >::max ( )
throw (
)
inlinestatic
LLONG_MAX.

 max() [6/11]

static Uint8() mi::base::numeric_traits< Uint8 >::max ( )
throw (
)
inlinestatic
UCHAR_MAX.

 max() [7/11]

static Uint16() mi::base::numeric_traits< Uint16 >::max ( )
throw (
)
inlinestatic
USHRT_MAX.

 max() [8/11]

static Uint32() mi::base::numeric_traits< Uint32 >::max ( )
throw (
)
inlinestatic
UINT_MAX.

 max() [9/11]

static Uint64() mi::base::numeric_traits< Uint64 >::max ( )
throw (
)
inlinestatic
ULLONG_MAX.

 max() [10/11]

static Float32() mi::base::numeric_traits< Float32 >::max ( )
throw (
)
inlinestatic
FLT_MAX.

 max() [11/11]

static Float64() mi::base::numeric_traits< Float64 >::max ( )
throw (
)
inlinestatic
DBL_MAX.

 min() [1/7]

template<typename T>
static T() mi::base::numeric_traits_base<T>::min ( )
throw (
)
inlinestatic

Returns the minimum finite value for T (and for floating point types the minimum positive value).

The value is equivalent to standard C constants CHAR_MIN, SHRT_MIN, FLT_MIN, DBL_MIN, etc.

Returns
the minimum finite value for T.

 min() [2/7]

static Sint8() mi::base::numeric_traits< Sint8 >::min ( )
throw (
)
inlinestatic
SCHAR_MIN.

 min() [3/7]

static Sint16() mi::base::numeric_traits< Sint16 >::min ( )
throw (
)
inlinestatic
SHRT_MIN.

 min() [4/7]

static Sint32() mi::base::numeric_traits< Sint32 >::min ( )
throw (
)
inlinestatic
INT_MIN.

 min() [5/7]

static Sint64() mi::base::numeric_traits< Sint64 >::min ( )
throw (
)
inlinestatic
LLONG_MIN.

 min() [6/7]

static Float32() mi::base::numeric_traits< Float32 >::min ( )
throw (
)
inlinestatic
FLT_MIN.

 min() [7/7]

static Float64() mi::base::numeric_traits< Float64 >::min ( )
throw (
)
inlinestatic
DBL_MIN.

 negative_max() [1/7]

template<typename T>
static T mi::base::numeric_traits_base<T>::negative_max ( )
throw (
)
inlinestatic

Returns the smallest finite negative value for T.

For signed integer types this value is typically (-max()-1). For unsigned integer types it is 0. For floating point types it is typically (-max()).

Returns
the smallest finite negative value for T.

 negative_max() [2/7]

static Sint8 mi::base::numeric_traits< Sint8 >::negative_max ( )
throw (
)
inlinestatic
SCHAR_MIN.

 negative_max() [3/7]

static Sint16 mi::base::numeric_traits< Sint16 >::negative_max ( )
throw (
)
inlinestatic
SHRT_MIN.

 negative_max() [4/7]

static Sint32 mi::base::numeric_traits< Sint32 >::negative_max ( )
throw (
)
inlinestatic
INT_MIN.

 negative_max() [5/7]

static Sint64 mi::base::numeric_traits< Sint64 >::negative_max ( )
throw (
)
inlinestatic
LLONG_MIN.

 negative_max() [6/7]

static Float32 mi::base::numeric_traits< Float32 >::negative_max ( )
throw (
)
inlinestatic

-FLT_MAX

 negative_max() [7/7]

static Float64 mi::base::numeric_traits< Float64 >::negative_max ( )
throw (
)
inlinestatic

-DBL_MAX

 quiet_NaN()

template<typename T>
static T mi::base::numeric_traits_base<T>::quiet_NaN ( )
throw (
)
inlinestatic

Returns a quiet NaN value for T, if one exists, and T() otherwise.

 signaling_NaN()

template<typename T>
static T mi::base::numeric_traits_base<T>::signaling_NaN ( )
throw (
)
inlinestatic

Returns a signaling NaN value for T, if one exists, and T() otherwise.

Variable Documentation

 has_infinity [1/3]

template<typename T>
const bool mi::base::numeric_traits_base<T>::has_infinity = false
static

Constant that is true if and only if T has an infinity representation.

You can get the infinity representation through the infinity() method.

 has_infinity [2/3]

const bool mi::base::numeric_traits< Float32 >::has_infinity = true
static

Has infinity value.

 has_infinity [3/3]

const bool mi::base::numeric_traits< Float64 >::has_infinity = true
static

Has infinity value.

 has_quiet_NaN [1/3]

template<typename T>
const bool mi::base::numeric_traits_base<T>::has_quiet_NaN = false
static

Constant that is true if and only if T has a quiet NaN (not-a-number) representation.

You can get the quiet NaN representation through the quiet_NaN() method.

 has_quiet_NaN [2/3]

const bool mi::base::numeric_traits< Float32 >::has_quiet_NaN = true
static

Has a quiet NaN value.

 has_quiet_NaN [3/3]

const bool mi::base::numeric_traits< Float64 >::has_quiet_NaN = true
static

Has a quiet NaN value.

 has_signaling_NaN [1/3]

template<typename T>
const bool mi::base::numeric_traits_base<T>::has_signaling_NaN = false
static

Constant that is true if and only if T has a signaling NaN (not-a-number) representation.

You can get the signaling NaN representation through the signaling_NaN() method.

 has_signaling_NaN [2/3]

const bool mi::base::numeric_traits< Float32 >::has_signaling_NaN = true
static

Has a signaling NaN value.

 has_signaling_NaN [3/3]

const bool mi::base::numeric_traits< Float64 >::has_signaling_NaN = true
static

Has a signaling NaN value.

 is_specialized [1/11]

template<typename T>
const bool mi::base::numeric_traits_base<T>::is_specialized = false
static

Constant that is true if and only if this traits is specialized for T.

 is_specialized [2/11]

const bool mi::base::numeric_traits< Sint8 >::is_specialized = true
static

true for specialization.

 is_specialized [3/11]

const bool mi::base::numeric_traits< Sint16 >::is_specialized = true
static

true for specialization.

 is_specialized [4/11]

const bool mi::base::numeric_traits< Sint32 >::is_specialized = true
static

true for specialization.

 is_specialized [5/11]

const bool mi::base::numeric_traits< Sint64 >::is_specialized = true
static

true for specialization.

 is_specialized [6/11]

const bool mi::base::numeric_traits< Uint8 >::is_specialized = true
static

true for specialization.

 is_specialized [7/11]

const bool mi::base::numeric_traits< Uint16 >::is_specialized = true
static

true for specialization.

 is_specialized [8/11]

const bool mi::base::numeric_traits< Uint32 >::is_specialized = true
static

true for specialization.

 is_specialized [9/11]

const bool mi::base::numeric_traits< Uint64 >::is_specialized = true
static

true for specialization.

 is_specialized [10/11]

const bool mi::base::numeric_traits< Float32 >::is_specialized = true
static

true for specialization.

 is_specialized [11/11]

const bool mi::base::numeric_traits< Float64 >::is_specialized = true
static

true for specialization.