36namespace Gecode {
namespace Support {
51 operator bool(
void)
const;
56 n.store(n0,std::memory_order_release);
60 (void)
n.fetch_add(1U,std::memory_order_relaxed);
64 return n.fetch_sub(1U,std::memory_order_acq_rel) == 1U;
67 RefCount::operator bool(
void)
const {
68 return n.load(std::memory_order_acquire) > 0U;
int n
Number of negative literals for node type.
A class for thread-safe reference counting.
bool dec(void)
Decrement counter and return true if it hits zero.
void inc(void)
Increment counter.
std::atomic_ulong n
The reference count.
RefCount(unsigned long int n)
Initialize.
Gecode toplevel namespace