NVIDIA Iray: Math API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::base::Atom32 Class Reference

A 32-bit unsigned counter with atomic arithmetic, increments, and decrements. More...

Public Member Functions

 Atom32 ()
 The default constructor initializes the counter to zero. More...
 
 Atom32 (const Uint32 value)
 This constructor initializes the counter to value. More...
 
 Atom32 (const mi::base::Atom32 &other)
 The copy constructor assigns the value of other to the counter. More...
 
mi::base::Atom32operator= (const mi::base::Atom32 &rhs)
 Assigns the value of rhs to the counter. More...
 
Uint32 operator= (const Uint32 rhs)
 Assigns rhs to the counter. More...
 
Uint32 operator+= (const Uint32 rhs)
 Adds rhs to the counter. More...
 
Uint32 operator-= (const Uint32 rhs)
 Subtracts rhs from the counter. More...
 
Uint32 operator++ ()
 Increments the counter by one (pre-increment). More...
 
Uint32 operator++ (int)
 Increments the counter by one (post-increment). More...
 
Uint32 operator-- ()
 Decrements the counter by one (pre-decrement). More...
 
Uint32 operator-- (int)
 Decrements the counter by one (post-decrement). More...
 
 operator Uint32 () const
 Conversion operator to mi::Uint32. More...
 
Uint32 swap (const Uint32 rhs)
 Assigns rhs to the counter and returns the old value of counter. More...
 

Detailed Description

A 32-bit unsigned counter with atomic arithmetic, increments, and decrements.

Constructor & Destructor Documentation

mi::base::Atom32::Atom32 ( )
inline

The default constructor initializes the counter to zero.

mi::base::Atom32::Atom32 ( const Uint32  value)
inline

This constructor initializes the counter to value.

mi::base::Atom32::Atom32 ( const mi::base::Atom32 other)
inline

The copy constructor assigns the value of other to the counter.

Member Function Documentation

mi::base::Atom32::operator Uint32 ( ) const
inline

Conversion operator to mi::Uint32.

Uint32 mi::base::Atom32::operator++ ( )

Increments the counter by one (pre-increment).

Uint32 mi::base::Atom32::operator++ ( int  )

Increments the counter by one (post-increment).

Uint32 mi::base::Atom32::operator+= ( const Uint32  rhs)

Adds rhs to the counter.

Uint32 mi::base::Atom32::operator-- ( )

Decrements the counter by one (pre-decrement).

Uint32 mi::base::Atom32::operator-- ( int  )

Decrements the counter by one (post-decrement).

Uint32 mi::base::Atom32::operator-= ( const Uint32  rhs)

Subtracts rhs from the counter.

mi::base::Atom32& mi::base::Atom32::operator= ( const mi::base::Atom32 rhs)

Assigns the value of rhs to the counter.

Uint32 mi::base::Atom32::operator= ( const Uint32  rhs)
inline

Assigns rhs to the counter.

Uint32 mi::base::Atom32::swap ( const Uint32  rhs)

Assigns rhs to the counter and returns the old value of counter.