 |
SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
|
Go to the documentation of this file.
6 #ifndef swcdb_core_Atomic_h
7 #define swcdb_core_Atomic_h
13 namespace SWC {
namespace Core {
17 template<
typename T, std::memory_order OrderT=std::memory_order_relaxed>
23 template<
typename ValueT>
25 explicit AtomicBase(ValueT initial) noexcept : std::atomic<T>(initial) { }
38 std::atomic<T>::store(v, OrderT);
48 return std::atomic<T>::exchange(value, OrderT);
53 return std::atomic<T>::compare_exchange_weak(at, value, OrderT);
57 operator T() const noexcept {
68 template<
typename T, std::memory_order OrderT=std::memory_order_relaxed>
74 template<
typename ValueT>
139 #pragma GCC diagnostic push
140 #pragma GCC diagnostic ignored "-Weffc++"
152 #pragma GCC diagnostic pop
196 template<
typename T, std::memory_order OrderT=std::memory_order_relaxed>
199 return out << v.
load();
205 #endif // swcdb_core_Atomic_h
constexpr SWC_CAN_INLINE bool compare_exchange_weak(T &at, T value) noexcept
constexpr SWC_CAN_INLINE T operator++(int) noexcept
AtomicBase(const AtomicBase< T > &)=delete
constexpr SWC_CAN_INLINE AtomicBase() noexcept
void load(int &err, const std::string &filepath, DB::Schema::Ptr &schema)
constexpr SWC_CAN_INLINE AtomicBase(ValueT initial) noexcept
constexpr SWC_CAN_INLINE T and_rslt(T v) noexcept
constexpr SWC_CAN_INLINE T sub_rslt(T v) noexcept
constexpr SWC_CAN_INLINE T add_rslt(T v) noexcept
AtomicBase(const AtomicBase< T > &&)=delete
constexpr SWC_CAN_INLINE void store(T v) noexcept
Atomic(const Atomic< T > &)=delete
The SWC-DB C++ namespace 'SWC'.
constexpr SWC_CAN_INLINE T xor_rslt(T v) noexcept
constexpr SWC_CAN_INLINE T operator--(int) noexcept
AtomicBase< T > & operator=(ValueT v)=delete
constexpr SWC_CAN_INLINE Atomic() noexcept
constexpr SWC_CAN_INLINE T exchange(T value) noexcept
SWC_CAN_INLINE std::ostream & operator<<(std::ostream &out, const AtomicBase< T, OrderT > &v)
constexpr SWC_CAN_INLINE T or_rslt(T v) noexcept
Atomic(const Atomic< T > &&)=delete
constexpr SWC_CAN_INLINE T fetch_and(T v) noexcept
constexpr SWC_CAN_INLINE T load() const noexcept
Atomic< T > & operator=(ValueT v)=delete
constexpr SWC_CAN_INLINE Atomic(ValueT initial) noexcept
constexpr SWC_CAN_INLINE T fetch_sub(T v) noexcept
constexpr SWC_CAN_INLINE T fetch_add(T v) noexcept
constexpr SWC_CAN_INLINE T fetch_or(T v) noexcept
constexpr SWC_CAN_INLINE T fetch_xor(T v) noexcept
AtomicBase< bool > AtomicBool