IODA
ioda::PairOfDistributionsAccumulator< T > Class Template Reference

Implementation of the Accumulator interface suitable for the PairOfDistributions. More...

#include <PairOfDistributionsAccumulator.h>

Inheritance diagram for ioda::PairOfDistributionsAccumulator< T >:
Collaboration diagram for ioda::PairOfDistributionsAccumulator< T >:

Public Member Functions

 PairOfDistributionsAccumulator (std::unique_ptr< Accumulator< T >> firstAccumulator, std::unique_ptr< Accumulator< T >> secondAccumulator, std::size_t firstNumLocs)
 
void addTerm (std::size_t loc, const T &term) override
 Increment the sum with the contribution term of location loc held on the current PE. More...
 
computeResult () const override
 Return the sum of contributions associated with locations held on all PEs (each taken into account only once). More...
 
- Public Member Functions inherited from ioda::Accumulator< T >
virtual ~Accumulator ()
 

Private Attributes

std::unique_ptr< Accumulator< T > > firstAccumulator_
 
std::unique_ptr< Accumulator< T > > secondAccumulator_
 
std::size_t firstNumLocs_
 

Detailed Description

template<typename T>
class ioda::PairOfDistributionsAccumulator< T >

Implementation of the Accumulator interface suitable for the PairOfDistributions.

Definition at line 21 of file PairOfDistributionsAccumulator.h.

Constructor & Destructor Documentation

◆ PairOfDistributionsAccumulator()

template<typename T >
ioda::PairOfDistributionsAccumulator< T >::PairOfDistributionsAccumulator ( std::unique_ptr< Accumulator< T >>  firstAccumulator,
std::unique_ptr< Accumulator< T >>  secondAccumulator,
std::size_t  firstNumLocs 
)
inline

Definition at line 23 of file PairOfDistributionsAccumulator.h.

Member Function Documentation

◆ addTerm()

template<typename T >
void ioda::PairOfDistributionsAccumulator< T >::addTerm ( std::size_t  loc,
const T &  term 
)
inlineoverridevirtual

Increment the sum with the contribution term of location loc held on the current PE.

Implements ioda::Accumulator< T >.

Definition at line 31 of file PairOfDistributionsAccumulator.h.

◆ computeResult()

template<typename T >
T ioda::PairOfDistributionsAccumulator< T >::computeResult ( ) const
inlineoverridevirtual

Return the sum of contributions associated with locations held on all PEs (each taken into account only once).

Implements ioda::Accumulator< T >.

Definition at line 38 of file PairOfDistributionsAccumulator.h.

Member Data Documentation

◆ firstAccumulator_

template<typename T >
std::unique_ptr<Accumulator<T> > ioda::PairOfDistributionsAccumulator< T >::firstAccumulator_
private

Definition at line 43 of file PairOfDistributionsAccumulator.h.

◆ firstNumLocs_

template<typename T >
std::size_t ioda::PairOfDistributionsAccumulator< T >::firstNumLocs_
private

Definition at line 45 of file PairOfDistributionsAccumulator.h.

◆ secondAccumulator_

template<typename T >
std::unique_ptr<Accumulator<T> > ioda::PairOfDistributionsAccumulator< T >::secondAccumulator_
private

Definition at line 44 of file PairOfDistributionsAccumulator.h.


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