IODA
ioda::GeneralDistributionAccumulator< T > Class Template Reference

Implementation of the Accumulator interface suitable for any (possibly overlapping) distribution, but potentially less efficient than specialized implementations. More...

#include <GeneralDistributionAccumulator.h>

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

Public Member Functions

 GeneralDistributionAccumulator (const T &, const eckit::mpi::Comm &comm, const std::vector< bool > &patchObs)
 
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...
 
T 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

T localResult_
 
const eckit::mpi::Comm & comm_
 
const std::vector< bool > & patchObs_
 

Detailed Description

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

Implementation of the Accumulator interface suitable for any (possibly overlapping) distribution, but potentially less efficient than specialized implementations.

Definition at line 22 of file GeneralDistributionAccumulator.h.

Constructor & Destructor Documentation

◆ GeneralDistributionAccumulator()

template<typename T >
ioda::GeneralDistributionAccumulator< T >::GeneralDistributionAccumulator ( const T &  ,
const eckit::mpi::Comm &  comm,
const std::vector< bool > &  patchObs 
)
inline

Definition at line 24 of file GeneralDistributionAccumulator.h.

Member Function Documentation

◆ addTerm()

template<typename T >
void ioda::GeneralDistributionAccumulator< 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 29 of file GeneralDistributionAccumulator.h.

◆ computeResult()

template<typename T >
T ioda::GeneralDistributionAccumulator< 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 34 of file GeneralDistributionAccumulator.h.

Member Data Documentation

◆ comm_

template<typename T >
const eckit::mpi::Comm& ioda::GeneralDistributionAccumulator< T >::comm_
private

Definition at line 42 of file GeneralDistributionAccumulator.h.

◆ localResult_

template<typename T >
T ioda::GeneralDistributionAccumulator< T >::localResult_
private

Definition at line 41 of file GeneralDistributionAccumulator.h.

◆ patchObs_

template<typename T >
const std::vector<bool>& ioda::GeneralDistributionAccumulator< T >::patchObs_
private

Definition at line 43 of file GeneralDistributionAccumulator.h.


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