4 #include <shogun/lib/config.h> 20 RefCount(int32_t ref_start=0) : rc(ref_start) {};
28 return rc.fetch_add(1, std::memory_order_relaxed)+1;
37 return rc.fetch_sub(1, std::memory_order_acquire)-1;
46 return rc.load(std::memory_order_acquire);
51 std::atomic<int32_t> rc;
55 #endif //_REFCOUNT__H__
SG_FORCED_INLINE int32_t ref()
RefCount(int32_t ref_start=0)
SG_FORCED_INLINE int32_t unref()
all of classes and functions are contained in the shogun namespace
SG_FORCED_INLINE int32_t ref_count()