Cuda battery library
Loading...
Searching...
No Matches
battery::memory< read_only > Class Template Reference

#include <memory.hpp>

Public Types

template<class T >
using atomic_type = T
 

Static Public Member Functions

template<class T >
CUDA static INLINE constexpr T load (const atomic_type< T > &a)
 
template<class T >
CUDA static INLINE constexpr std::enable_if_t<!read_only, void > store (atomic_type< T > &a, T v)
 
template<class T >
CUDA static INLINE constexpr std::enable_if_t<!read_only, T > exchange (atomic_type< T > &a, T v)
 

Static Public Attributes

static constexpr const bool sequential = true
 

Detailed Description

template<bool read_only>
class battery::memory< read_only >

Represent the memory of a variable that cannot be accessed by multiple threads.

Member Typedef Documentation

◆ atomic_type

template<bool read_only>
template<class T >
using battery::memory< read_only >::atomic_type = T

Member Function Documentation

◆ load()

template<bool read_only>
template<class T >
CUDA static INLINE constexpr T battery::memory< read_only >::load ( const atomic_type< T > & a)
inlinestaticconstexpr

◆ store()

template<bool read_only>
template<class T >
CUDA static INLINE constexpr std::enable_if_t<!read_only, void > battery::memory< read_only >::store ( atomic_type< T > & a,
T v )
inlinestaticconstexpr

◆ exchange()

template<bool read_only>
template<class T >
CUDA static INLINE constexpr std::enable_if_t<!read_only, T > battery::memory< read_only >::exchange ( atomic_type< T > & a,
T v )
inlinestaticconstexpr

Member Data Documentation

◆ sequential

template<bool read_only>
const bool battery::memory< read_only >::sequential = true
staticconstexpr

Indicate this memory is written by a single thread.


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