18 #define OIIO_USE_STDATOMIC 1
37 if (a <= bval || avar.compare_exchange_weak(a, bval))
50 if (a >= bval || avar.compare_exchange_weak(a, bval))
62 float oldval = a.load();
63 float newval = oldval +
f;
64 if (a.compare_exchange_weak(oldval, newval))
75 double oldval = a.load();
76 double newval = oldval +
f;
77 if (a.compare_exchange_weak(oldval, newval))
OIIO_FORCEINLINE void atomic_max(atomic< T > &avar, const T &bval)
Atomically set avar to the maximum of its current value and bval.
GLboolean GLboolean GLboolean GLboolean a
atomic< long long > atomic_ll
#define OIIO_NAMESPACE_END
OIIO_FORCEINLINE float atomic_fetch_add(atomic< float > &a, float f)
#define OIIO_NAMESPACE_BEGIN
OIIO_FORCEINLINE void atomic_min(atomic< T > &avar, const T &bval)
Atomically set avar to the minimum of its current value and bval.