Galois::GAtomic< T > Class Template Reference

Atomic Wrapper for any integer or bool type. More...

#include <Atomic.h>

List of all members.

Public Member Functions

 GAtomic (const T &i)
 Initialize with a value.
operator+= (const T &rhs)
 atomic add and fetch
operator-= (const T &rhs)
 atomic sub and fetch
operator++ ()
 atomic increment and fetch
operator++ (int)
 atomic fetch and increment
operator-- ()
 atomic decrement and fetch
operator-- (int)
 atomic fetch and decrement
 operator T () const
 conversion operator to base data type
operator= (const T &i)
 assign from underlying type
operator= (const GAtomic &i)
 assignment operator
bool cas (const T &expected, const T &updated)
 direct compare and swap

Private Attributes

val

Detailed Description

template<typename T>
class Galois::GAtomic< T >

Atomic Wrapper for any integer or bool type.

An atomic wrapper that provides sensible atomic behavior for most primative data types. Operators return the value of type T so as to retain atomic RMW semantics.


Constructor & Destructor Documentation

template<typename T >
Galois::GAtomic< T >::GAtomic ( const T &  i  )  [inline, explicit]

Initialize with a value.


Member Function Documentation

template<typename T >
bool Galois::GAtomic< T >::cas ( const T &  expected,
const T &  updated 
) [inline]

direct compare and swap

template<typename T >
Galois::GAtomic< T >::operator T (  )  const [inline]

conversion operator to base data type

template<typename T >
T Galois::GAtomic< T >::operator++ ( int   )  [inline]

atomic fetch and increment

template<typename T >
T Galois::GAtomic< T >::operator++ (  )  [inline]

atomic increment and fetch

template<typename T >
T Galois::GAtomic< T >::operator+= ( const T &  rhs  )  [inline]

atomic add and fetch

template<typename T >
T Galois::GAtomic< T >::operator-- ( int   )  [inline]

atomic fetch and decrement

template<typename T >
T Galois::GAtomic< T >::operator-- (  )  [inline]

atomic decrement and fetch

template<typename T >
T Galois::GAtomic< T >::operator-= ( const T &  rhs  )  [inline]

atomic sub and fetch

template<typename T >
T Galois::GAtomic< T >::operator= ( const GAtomic< T > &  i  )  [inline]

assignment operator

template<typename T >
T Galois::GAtomic< T >::operator= ( const T &  i  )  [inline]

assign from underlying type


Member Data Documentation

template<typename T >
T Galois::GAtomic< T >::val [private]

The documentation for this class was generated from the following file:
Generated on Tue Aug 2 11:51:29 2011 for Galois by  doxygen 1.6.3