Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::TRelaxedAtomic< T > Class Template Referencefinal

Wrapper for relaxed atomic read and write. May resort to lock based read/write if atomic read/write for type T is not supported. More...

#include <TRelaxedAtomic.h>

Public Member Functions

 TRelaxedAtomic ()
 
 TRelaxedAtomic (T value)
 
relaxedRead () const
 
void relaxedWrite (T value)
 
relaxedFetchAdd (T value)
 

Detailed Description

template<typename T>
class ph::TRelaxedAtomic< T >

Wrapper for relaxed atomic read and write. May resort to lock based read/write if atomic read/write for type T is not supported.

Constructor & Destructor Documentation

◆ TRelaxedAtomic() [1/2]

template<typename T >
ph::TRelaxedAtomic< T >::TRelaxedAtomic ( )
inline

◆ TRelaxedAtomic() [2/2]

template<typename T >
ph::TRelaxedAtomic< T >::TRelaxedAtomic ( T value)
inline

Member Function Documentation

◆ relaxedFetchAdd()

template<typename T >
T ph::TRelaxedAtomic< T >::relaxedFetchAdd ( T value)
inline

◆ relaxedRead()

template<typename T >
T ph::TRelaxedAtomic< T >::relaxedRead ( ) const
inline
Note
Prefixing the method with the word "relaxed" is intended–it is to emphasize the fact that the read operation is with relaxed memory order, just like std::memory_order_relaxed would be specified at the call site if std::atomic was used directly.

◆ relaxedWrite()

template<typename T >
void ph::TRelaxedAtomic< T >::relaxedWrite ( T value)
inline
Note
Prefixing the method with the word "relaxed" is intended–it is to emphasize the fact that the write operation is with relaxed memory order, just like std::memory_order_relaxed would be specified at the call site if std::atomic was used directly.

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