RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
Public Types | Public Member Functions | List of all members
RAJA::AtomicRef< T, Policy > Class Template Reference

Atomic wrapper object. More...

#include <atomic.hpp>

Public Types

using value_type = T
 

Public Member Functions

RAJA_INLINE constexpr RAJA_HOST_DEVICE AtomicRef (value_type *value_ptr)
 
RAJA_INLINE constexpr RAJA_HOST_DEVICE AtomicRef (AtomicRef const &c)
 
AtomicRefoperator= (AtomicRef const &)=delete
 
RAJA_INLINE RAJA_HOST_DEVICE value_typegetPointer () const
 
RAJA_INLINE RAJA_HOST_DEVICE void store (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type operator= (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type load () const
 
RAJA_INLINE RAJA_HOST_DEVICE operator value_type () const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type exchange (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type CAS (value_type compare, value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE bool compare_exchange_strong (value_type &expect, value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE bool compare_exchange_weak (value_type &expect, value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type operator++ () const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type operator++ (int) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type operator-- () const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type operator-- (int) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type fetch_add (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type operator+= (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type fetch_sub (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type operator-= (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type fetch_min (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type min (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type fetch_max (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type max (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type fetch_and (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type operator&= (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type fetch_or (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type operator|= (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type fetch_xor (value_type rhs) const
 
RAJA_INLINE RAJA_HOST_DEVICE value_type operator^= (value_type rhs) const
 

Detailed Description

template<typename T, typename Policy = auto_atomic>
class RAJA::AtomicRef< T, Policy >

Atomic wrapper object.

Provides an interface akin to that provided by std::atomic, but for an arbitrary memory location.

This object provides an OO interface to the global function calls provided as RAJA::atomicXXX

Member Typedef Documentation

◆ value_type

template<typename T , typename Policy = auto_atomic>
using RAJA::AtomicRef< T, Policy >::value_type = T

Constructor & Destructor Documentation

◆ AtomicRef() [1/2]

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE constexpr RAJA_HOST_DEVICE RAJA::AtomicRef< T, Policy >::AtomicRef ( value_type value_ptr)
inlineexplicitconstexpr

◆ AtomicRef() [2/2]

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE constexpr RAJA_HOST_DEVICE RAJA::AtomicRef< T, Policy >::AtomicRef ( AtomicRef< T, Policy > const &  c)
inlineconstexpr

Member Function Documentation

◆ operator=() [1/2]

template<typename T , typename Policy = auto_atomic>
AtomicRef& RAJA::AtomicRef< T, Policy >::operator= ( AtomicRef< T, Policy > const &  )
delete

◆ getPointer()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type* RAJA::AtomicRef< T, Policy >::getPointer ( ) const
inline

◆ store()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE void RAJA::AtomicRef< T, Policy >::store ( value_type  rhs) const
inline

◆ operator=() [2/2]

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::operator= ( value_type  rhs) const
inline

◆ load()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::load ( ) const
inline

◆ operator value_type()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE RAJA::AtomicRef< T, Policy >::operator value_type ( ) const
inline

◆ exchange()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::exchange ( value_type  rhs) const
inline

◆ CAS()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::CAS ( value_type  compare,
value_type  rhs 
) const
inline

◆ compare_exchange_strong()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE bool RAJA::AtomicRef< T, Policy >::compare_exchange_strong ( value_type expect,
value_type  rhs 
) const
inline

◆ compare_exchange_weak()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE bool RAJA::AtomicRef< T, Policy >::compare_exchange_weak ( value_type expect,
value_type  rhs 
) const
inline

◆ operator++() [1/2]

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::operator++ ( ) const
inline

◆ operator++() [2/2]

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::operator++ ( int  ) const
inline

◆ operator--() [1/2]

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::operator-- ( ) const
inline

◆ operator--() [2/2]

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::operator-- ( int  ) const
inline

◆ fetch_add()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::fetch_add ( value_type  rhs) const
inline

◆ operator+=()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::operator+= ( value_type  rhs) const
inline

◆ fetch_sub()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::fetch_sub ( value_type  rhs) const
inline

◆ operator-=()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::operator-= ( value_type  rhs) const
inline

◆ fetch_min()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::fetch_min ( value_type  rhs) const
inline

◆ min()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::min ( value_type  rhs) const
inline

◆ fetch_max()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::fetch_max ( value_type  rhs) const
inline

◆ max()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::max ( value_type  rhs) const
inline

◆ fetch_and()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::fetch_and ( value_type  rhs) const
inline

◆ operator&=()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::operator&= ( value_type  rhs) const
inline

◆ fetch_or()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::fetch_or ( value_type  rhs) const
inline

◆ operator|=()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::operator|= ( value_type  rhs) const
inline

◆ fetch_xor()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::fetch_xor ( value_type  rhs) const
inline

◆ operator^=()

template<typename T , typename Policy = auto_atomic>
RAJA_INLINE RAJA_HOST_DEVICE value_type RAJA::AtomicRef< T, Policy >::operator^= ( value_type  rhs) const
inline

The documentation for this class was generated from the following file: