1 #ifndef FWCore_Utilities_RunningAverage_H
2 #define FWCore_Utilities_RunningAverage_H
8 namespace test_average {
9 namespace running_average {
22 static constexpr
int N = 16;
37 while (!
m_curr.compare_exchange_weak(e, e + 1))
41 if (!
m_buffer[k].compare_exchange_strong(old, q))
RunningAverage(unsigned int k=4)
Abs< T >::type abs(const T &t)
std::array< std::atomic< int >, N > m_buffer
std::atomic< int > m_mean
std::atomic< int > m_curr
void update(unsigned int q)