5#ifndef ROOT_RBinWithError
6#define ROOT_RBinWithError
14namespace Experimental {
26 explicit operator float()
const {
return fSum; }
60 fSum2 *= factor * factor;
74 while (std::signbit(origSum2)) {
81 double negated = std::copysign(origSum2, -1.0);
94 double sum2 = origSum2 + a2;
117 while (std::signbit(origSum2)) {
135 if (!std::memcmp(&origSum2, &ret->
fSum2,
sizeof(origSum2))) {
140 origSum2 = ret->
fSum2;
std::enable_if_t< std::is_arithmetic_v< T >, bool > AtomicCompareExchangeAcquire(T *ptr, T *expected, T *desired)
std::enable_if_t< std::is_arithmetic_v< T > > AtomicLoadAcquire(const T *ptr, T *ret)
std::enable_if_t< std::is_arithmetic_v< T > > AtomicStoreRelease(T *ptr, T *val)
std::enable_if_t< std::is_arithmetic_v< T > > AtomicLoad(const T *ptr, T *ret)
A special bin content type to compute the bin error in weighted filling.
RBinWithError & operator+=(double w)
RBinWithError operator++(int)
RBinWithError & operator+=(const RBinWithError &rhs)
void AtomicLoad(RBinWithError *ret) const
RBinWithError & operator++()
RBinWithError & operator*=(double factor)
void AtomicAdd(double a, double a2)
void AtomicAdd(const RBinWithError &rhs)
Add another bin content using atomic instructions.
void AtomicAddRelease(double w)
static uint64_t sum(uint64_t i)