The Gaudi Framework  v32r2 (46d42edc)
Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator > Class Template Reference

Buffer is a non atomic Accumulator which, when it goes out-of-scope, updates the underlying thread-safe Accumulator for all previous updates in one go. More...

#include <GaudiKernel/Counters.h>

Inheritance diagram for Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >:
Collaboration diagram for Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >:

Public Member Functions

 Buffer ()=delete
 
 Buffer (prime_type &p)
 
 Buffer (const Buffer &)=delete
 
void operator= (const Buffer &)=delete
 
 Buffer (Buffer &&other)
 
void push ()
 
 ~Buffer ()
 

Private Types

using prime_type = ContainedAccumulator< Arithmetic, atomicity::full >
 
using base_type = ContainedAccumulator< Arithmetic, atomicity::none >
 

Private Attributes

prime_typem_prime
 

Detailed Description

template<typename Arithmetic, template< typename Int, atomicity Ato > class ContainedAccumulator>
class Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >

Buffer is a non atomic Accumulator which, when it goes out-of-scope, updates the underlying thread-safe Accumulator for all previous updates in one go.

It is templated by the basic accumulator type and has same interface

See also
Gaudi::Accumulators for detailed documentation

Definition at line 580 of file Counters.h.

Member Typedef Documentation

◆ base_type

template<typename Arithmetic , template< typename Int, atomicity Ato > class ContainedAccumulator>
using Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >::base_type = ContainedAccumulator<Arithmetic, atomicity::none>
private

Definition at line 582 of file Counters.h.

◆ prime_type

template<typename Arithmetic , template< typename Int, atomicity Ato > class ContainedAccumulator>
using Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >::prime_type = ContainedAccumulator<Arithmetic, atomicity::full>
private

Definition at line 581 of file Counters.h.

Constructor & Destructor Documentation

◆ Buffer() [1/4]

template<typename Arithmetic , template< typename Int, atomicity Ato > class ContainedAccumulator>
Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >::Buffer ( )
delete

◆ Buffer() [2/4]

template<typename Arithmetic , template< typename Int, atomicity Ato > class ContainedAccumulator>
Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >::Buffer ( prime_type p)
inline

Definition at line 586 of file Counters.h.

586 : base_type(), m_prime( p ) {}
ContainedAccumulator< Arithmetic, atomicity::none > base_type
Definition: Counters.h:582

◆ Buffer() [3/4]

template<typename Arithmetic , template< typename Int, atomicity Ato > class ContainedAccumulator>
Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >::Buffer ( const Buffer< Arithmetic, ContainedAccumulator > &  )
delete

◆ Buffer() [4/4]

template<typename Arithmetic , template< typename Int, atomicity Ato > class ContainedAccumulator>
Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >::Buffer ( Buffer< Arithmetic, ContainedAccumulator > &&  other)
inline

Definition at line 589 of file Counters.h.

589 : base_type( other ), m_prime( other.m_prime ) { other.reset(); }
ContainedAccumulator< Arithmetic, atomicity::none > base_type
Definition: Counters.h:582

◆ ~Buffer()

template<typename Arithmetic , template< typename Int, atomicity Ato > class ContainedAccumulator>
Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >::~Buffer ( )
inline

Definition at line 591 of file Counters.h.

591 { push(); }

Member Function Documentation

◆ operator=()

template<typename Arithmetic , template< typename Int, atomicity Ato > class ContainedAccumulator>
void Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >::operator= ( const Buffer< Arithmetic, ContainedAccumulator > &  )
delete

◆ push()

template<typename Arithmetic , template< typename Int, atomicity Ato > class ContainedAccumulator>
void Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >::push ( )
inline

Definition at line 590 of file Counters.h.

590 { m_prime.mergeAndReset( static_cast<base_type&&>( *this ) ); }

Member Data Documentation

◆ m_prime

template<typename Arithmetic , template< typename Int, atomicity Ato > class ContainedAccumulator>
prime_type& Gaudi::Accumulators::Buffer< Arithmetic, ContainedAccumulator >::m_prime
private

Definition at line 594 of file Counters.h.


The documentation for this class was generated from the following file: