19 #ifndef __libpbd_int62_h__
20 #define __libpbd_int62_h__
44 std::atomic<int64_t>
v;
64 int62_t (
int62_t const & other) {
v.store (other.
v.load(std::memory_order_acquire), std::memory_order_release); }
66 static const int64_t
max = 4611686018427387903;
67 static const int64_t
min = -2305843009213693952;
73 int62_t&
operator= (
int62_t const & other) {
v.store (other.
v.load(std::memory_order_acquire), std::memory_order_release);
return *
this; }
111 const char*
what ()
const throw () {
return "mismatched flags in int62_t"; }
126 explicit operator int64_t()
const {
return int62(
v); }
138 int64_t oldval =
v.load (std::memory_order_acquire);
140 while (!
v.compare_exchange_weak (oldval, newval, std::memory_order_release, std::memory_order_relaxed)) {
146 int64_t oldval =
v.load (std::memory_order_acquire);
148 while (!
v.compare_exchange_weak (oldval, newval, std::memory_order_release, std::memory_order_relaxed)) {
154 int64_t oldval =
v.load (std::memory_order_acquire);
156 while (!
v.compare_exchange_weak (oldval, newval, std::memory_order_release, std::memory_order_relaxed)) {
162 int64_t oldval =
v.load (std::memory_order_acquire);
164 while (!
v.compare_exchange_weak (oldval, newval, std::memory_order_release, std::memory_order_relaxed)) {
170 int64_t oldval =
v.load (std::memory_order_acquire);
172 while (!
v.compare_exchange_weak (oldval, newval, std::memory_order_release, std::memory_order_relaxed)) {
179 int64_t oldval =
v.load (std::memory_order_acquire);
181 while (!
v.compare_exchange_weak (oldval, newval, std::memory_order_release, std::memory_order_relaxed)) {
187 int64_t oldval =
v.load (std::memory_order_acquire);
189 while (!
v.compare_exchange_weak (oldval, newval, std::memory_order_release, std::memory_order_relaxed)) {
195 int64_t oldval =
v.load (std::memory_order_acquire);
197 while (!
v.compare_exchange_weak (oldval, newval, std::memory_order_release, std::memory_order_relaxed)) {
203 int64_t oldval =
v.load (std::memory_order_acquire);
205 while (!
v.compare_exchange_weak (oldval, newval, std::memory_order_release, std::memory_order_relaxed)) {
211 int64_t oldval =
v.load (std::memory_order_acquire);
213 while (!
v.compare_exchange_weak (oldval, newval, std::memory_order_release, std::memory_order_relaxed)) {
static bool flagged(int64_t v)
static const int64_t flagbit_mask
int62_t operator-() const
int62_t operator*(int64_t n) const
int62_t & operator+=(int64_t n)
int62_t operator+(int64_t n) const
int62_t & operator=(int64_t n)
bool operator<=(int62_t const &other) const
bool operator>=(int62_t const &other) const
int62_t(bool bc, int64_t vc)
bool operator!=(int62_t const &other) const
int62_t & operator*=(int64_t n)
int62_t & operator-=(int64_t n)
int62_t operator%(int64_t n) const
bool operator<(int62_t const &other) const
int62_t & operator%=(int64_t n)
int62_t & operator/=(int64_t n)
static int64_t build(bool flag, int64_t v)
bool operator>(int62_t const &other) const
int62_t operator/(int64_t n) const
static int64_t int62(int64_t v)
bool operator==(int62_t const &other) const
int62_t(int62_t const &other)
const char * what() const