|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef CXXUTILS_CACHEDVALUE_H
14 #define CXXUTILS_CACHEDVALUE_H
150 #endif // not CXXUTILS_CACHEDVALUE_H
CachedValue(T &&val) noexcept
Move constructor from a value.
void reset()
Reset the value to invalid.
const T * ptr() const
Return a pointer to the cached value.
void set(T &&val) const noexcept
Set the value by move, assuming it is currently invalid.
bool isValid() const
Test to see if the value is valid.
void store(T &&val) noexcept
Store a new value, by move.
CachedValue(const CachedValue &other)
Copy constructor.
void store(const T &val)
Store a new value.
CachedValue(CachedValue &&other) noexcept
Move constructor.
Cached value with atomic update.
CachedValue(const T &val)
Constructor from a value.
CachedValue()
Default constructor. Sets the value to invalid.
Emit stall instruction for use in a spin loop.
std::atomic< CacheState > m_cacheValid
Transient.
CacheState
State of the cached value; see below.
CachedValue(const CachedValue< U > &other)
Copy constructor from other type.
void set(const T &val) const
Set the value, assuming it is currently invalid.
CachedValue & operator=(const CachedValue &other)
Assignment.
T m_val ATLAS_THREAD_SAFE
The cached value.
Define macros for attributes used to control the static checker.