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

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

Public Member Functions

  Atom32 ()
  Default constructor initializes the counter to zero. More...
 
  Atom32 (const Uint32 val)
  Constructor initializes the counter to val. More...
 
Uint32  operator= (const Uint32 val)
  Assigns val to the counter. More...
 
Uint32  operator+= (const Uint32 val)
  Adds val to counter. More...
 
Uint32  operator-= (const Uint32 val)
  Subtracts val from counter. More...
 
Uint32  operator++ ()
  Increments counter by one. More...
 
Uint32  operator++ (int)
  Increments counter by one. More...
 
Uint32  operator-- ()
  Decrements counter by one. More...
 
Uint32  operator-- (int)
  Decrements counter by one. More...
 
  operator Uint32 () const
  Implicit conversion operator to mi::Uint32. More...
 
Uint32  swap (const Uint32 val)
  Assign val to counter and return the old value of counter. More...
 

Detailed Description

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

Constructor & Destructor Documentation

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

Default constructor initializes the counter to zero.

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

Constructor initializes the counter to val.

Member Function Documentation

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

Implicit conversion operator to mi::Uint32.

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

Assigns val to the counter.