IODA
|
Distribution assigning each record to a process if and only if a non-overlapping master distribution has done the same. More...
#include <ReplicaOfNonoverlappingDistribution.h>
Public Member Functions | |
ReplicaOfNonoverlappingDistribution (const eckit::mpi::Comm &comm, std::shared_ptr< const Distribution > master) | |
Constructor. More... | |
~ReplicaOfNonoverlappingDistribution () override | |
bool | isMyRecord (std::size_t RecNum) const override |
Returns true if record RecNum has been assigned to the calling PE during a previous call to assignRecord(). More... | |
std::string | name () const override |
![]() | |
NonoverlappingDistribution (const eckit::mpi::Comm &Comm) | |
~NonoverlappingDistribution () override | |
bool | isNonoverlapping () const override |
Returns true if the distribution does not assign any record to more than one PE, false otherwise. More... | |
void | assignRecord (const std::size_t RecNum, const std::size_t LocNum, const eckit::geometry::Point2 &point) override |
If the record RecNum has not yet been assigned to a PE, assigns it to the appropriate PE. More... | |
void | patchObs (std::vector< bool > &patchObsVec) const override |
Sets each element of the provided vector to true if the corresponding location is a "patch obs", i.e. More... | |
void | computePatchLocs () override |
If necessary, identifies locations of "patch obs", i.e. More... | |
void | min (int &x) const override |
Calculates the global minimum (over all locations on all PEs) of a location-dependent quantity. More... | |
void | min (std::size_t &x) const override |
void | min (float &x) const override |
void | min (double &x) const override |
void | min (std::vector< int > &x) const override |
Calculates the global minima (over all locations on all PEs) of multiple location-dependent quantities. More... | |
void | min (std::vector< std::size_t > &x) const override |
void | min (std::vector< float > &x) const override |
void | min (std::vector< double > &x) const override |
void | max (int &x) const override |
Calculates the global maximum (over all locations on all PEs) of a location-dependent quantity. More... | |
void | max (std::size_t &x) const override |
void | max (float &x) const override |
void | max (double &x) const override |
void | max (std::vector< int > &x) const override |
Calculates the global maxima (over all locations on all PEs) of multiple location-dependent quantities. More... | |
void | max (std::vector< std::size_t > &x) const override |
void | max (std::vector< float > &x) const override |
void | max (std::vector< double > &x) const override |
void | allGatherv (std::vector< size_t > &x) const override |
Gather observation data from all processes and deliver the combined data to all processes. More... | |
void | allGatherv (std::vector< int > &x) const override |
void | allGatherv (std::vector< float > &x) const override |
void | allGatherv (std::vector< double > &x) const override |
void | allGatherv (std::vector< util::DateTime > &x) const override |
void | allGatherv (std::vector< std::string > &x) const override |
size_t | globalUniqueConsecutiveLocationIndex (size_t loc) const override |
Map the index of a location held on the calling process to the index of the corresponding element of any vector produced by allGatherv(). More... | |
![]() | |
Distribution (const eckit::mpi::Comm &Comm) | |
virtual | ~Distribution () |
virtual bool | isIdentity () const |
Returns true if the distribution assigns all records to all PEs, false otherwise. More... | |
template<typename T > | |
std::unique_ptr< Accumulator< T > > | createAccumulator () const |
Create an object that can be used to calculate the sum of a location-dependent quantity over locations held on all PEs, each taken into account only once even if it's held on multiple PEs. More... | |
template<typename T > | |
std::unique_ptr< Accumulator< std::vector< T > > > | createAccumulator (std::size_t n) const |
Create an object that can be used to calculate the sums of n location-dependent quantities over locations held on all PEs, each taken into account only once even if it's held on multiple PEs. More... | |
size_t | rank () const |
Accessor to MPI rank. More... | |
Private Attributes | |
std::shared_ptr< const Distribution > | master_ |
Additional Inherited Members | |
![]() | |
const eckit::mpi::Comm & | comm_ |
Local MPI communicator. More... | |
![]() | |
double | dotProduct (const Distribution &dist, std::size_t numVariables, const std::vector< double > &v1, const std::vector< double > &v2) |
Computes the dot product between two vectors of obs distributed across MPI ranks. More... | |
std::size_t | globalNumNonMissingObs (const Distribution &dist, size_t numVariables, const std::vector< double > &v) |
Counts unique non-missing observations in a vector. More... | |
Distribution assigning each record to a process if and only if a non-overlapping master distribution has done the same.
Definition at line 22 of file ReplicaOfNonoverlappingDistribution.h.
|
explicit |
Constructor.
comm | The communicator used by master . |
master | Master distribution. The replica will assign each record to a process if and only if the master has done the same. |
Definition at line 19 of file ReplicaOfNonoverlappingDistribution.cc.
|
override |
Definition at line 28 of file ReplicaOfNonoverlappingDistribution.cc.
|
overridevirtual |
Returns true if record RecNum
has been assigned to the calling PE during a previous call to assignRecord().
Clients can use this function to determine which records to keep when reading in observations.
Implements ioda::Distribution.
Definition at line 33 of file ReplicaOfNonoverlappingDistribution.cc.
|
inlineoverridevirtual |
Implements ioda::Distribution.
Definition at line 38 of file ReplicaOfNonoverlappingDistribution.h.
|
private |
Definition at line 41 of file ReplicaOfNonoverlappingDistribution.h.