SPH
Public Member Functions | Friends | List of all members
Atomic< Type > Class Template Reference

Atomic value implemented using compare-exchange. More...

#include <AtomicFloat.h>

Public Member Functions

INLINE Atomic ()=default
 
INLINE Atomic (const Type f)
 
INLINE Atomic (const Atomic &other)
 
INLINE Type get () const
 
INLINE Atomicoperator= (const Type f)
 
INLINE Atomicoperator+= (const Type f)
 
INLINE Atomicoperator-= (const Type f)
 
INLINE Atomicoperator*= (const Type f)
 
INLINE Atomicoperator/= (const Type f)
 
INLINE Type operator+ (const Type f) const
 
INLINE Type operator- (const Type f) const
 
INLINE Type operator* (const Type f) const
 
INLINE Type operator/ (const Type f) const
 
INLINE bool operator== (const Type f) const
 
INLINE bool operator!= (const Type f) const
 
INLINE bool operator> (const Type f) const
 
INLINE bool operator< (const Type f) const
 

Friends

INLINE friend std::ostream & operator<< (std::ostream &stream, const Atomic &f)
 

Detailed Description

template<typename Type>
class Atomic< Type >

Atomic value implemented using compare-exchange.

This is mainly intended for floating-point values (floats and doubles), as atomic operations for integral types are supplied by the compiler.

Definition at line 19 of file AtomicFloat.h.

Constructor & Destructor Documentation

◆ Atomic() [1/3]

template<typename Type >
INLINE Atomic< Type >::Atomic ( )
default

◆ Atomic() [2/3]

template<typename Type >
INLINE Atomic< Type >::Atomic ( const Type  f)
inline

Definition at line 26 of file AtomicFloat.h.

◆ Atomic() [3/3]

template<typename Type >
INLINE Atomic< Type >::Atomic ( const Atomic< Type > &  other)
inline

Definition at line 30 of file AtomicFloat.h.

Member Function Documentation

◆ get()

template<typename Type >
INLINE Type Atomic< Type >::get ( ) const
inline

Definition at line 33 of file AtomicFloat.h.

◆ operator!=()

template<typename Type >
INLINE bool Atomic< Type >::operator!= ( const Type  f) const
inline

Definition at line 84 of file AtomicFloat.h.

◆ operator*()

template<typename Type >
INLINE Type Atomic< Type >::operator* ( const Type  f) const
inline

Definition at line 71 of file AtomicFloat.h.

◆ operator*=()

template<typename Type >
INLINE Atomic& Atomic< Type >::operator*= ( const Type  f)
inline

Definition at line 52 of file AtomicFloat.h.

◆ operator+()

template<typename Type >
INLINE Type Atomic< Type >::operator+ ( const Type  f) const
inline

Definition at line 63 of file AtomicFloat.h.

◆ operator+=()

template<typename Type >
INLINE Atomic& Atomic< Type >::operator+= ( const Type  f)
inline

Definition at line 42 of file AtomicFloat.h.

◆ operator-()

template<typename Type >
INLINE Type Atomic< Type >::operator- ( const Type  f) const
inline

Definition at line 67 of file AtomicFloat.h.

◆ operator-=()

template<typename Type >
INLINE Atomic& Atomic< Type >::operator-= ( const Type  f)
inline

Definition at line 47 of file AtomicFloat.h.

◆ operator/()

template<typename Type >
INLINE Type Atomic< Type >::operator/ ( const Type  f) const
inline

Definition at line 75 of file AtomicFloat.h.

◆ operator/=()

template<typename Type >
INLINE Atomic& Atomic< Type >::operator/= ( const Type  f)
inline

Definition at line 57 of file AtomicFloat.h.

◆ operator<()

template<typename Type >
INLINE bool Atomic< Type >::operator< ( const Type  f) const
inline

Definition at line 92 of file AtomicFloat.h.

◆ operator=()

template<typename Type >
INLINE Atomic& Atomic< Type >::operator= ( const Type  f)
inline

Definition at line 37 of file AtomicFloat.h.

◆ operator==()

template<typename Type >
INLINE bool Atomic< Type >::operator== ( const Type  f) const
inline

Definition at line 80 of file AtomicFloat.h.

◆ operator>()

template<typename Type >
INLINE bool Atomic< Type >::operator> ( const Type  f) const
inline

Definition at line 88 of file AtomicFloat.h.

Friends And Related Function Documentation

◆ operator<<

template<typename Type >
INLINE friend std::ostream& operator<< ( std::ostream &  stream,
const Atomic< Type > &  f 
)
friend

Definition at line 96 of file AtomicFloat.h.


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