MADNESS 0.10.1
Public Member Functions | Private Attributes | List of all members
madness::WorldDCSingleOwnerPmap< keyT > Class Template Reference

#include <worlddc.h>

Inheritance diagram for madness::WorldDCSingleOwnerPmap< keyT >:
Inheritance graph
[legend]
Collaboration diagram for madness::WorldDCSingleOwnerPmap< keyT >:
Collaboration graph
[legend]

Public Member Functions

 WorldDCSingleOwnerPmap (ProcessID owner)
 
ProcessID owner (const keyT &) const override
 Maps key to processor.
 
ProcessID single_owner () const override
 
- Public Member Functions inherited from madness::WorldDCPmapInterface< keyT >
virtual ~WorldDCPmapInterface ()
 
void deregister_callback (ptrT ptr)
 Deregisters object for receipt of redistribute callbacks.
 
virtual DistributionType distribution_type () const
 by default the map is distributed
 
std::size_t global_size (World &world) const
 Counts global number of entries in all containers associated with this process map.
 
std::size_t local_size () const
 Counts local number of entries in all containers associated with this process map.
 
virtual void print () const
 
void print_data_sizes (World &world, const std::string msg="") const
 Prints size info to std::cout.
 
void redistribute (World &world, const std::shared_ptr< WorldDCPmapInterface< keyT > > &newpmap)
 Invoking this switches all registered objects from this process map to the new one.
 
void register_callback (ptrT ptr)
 Registers object for receipt of redistribute callbacks.
 

Private Attributes

const ProcessID owner_
 

Additional Inherited Members

- Public Types inherited from madness::WorldDCPmapInterface< keyT >
typedef WorldDCRedistributeInterface< keyT > * ptrT
 

Detailed Description

template<typename keyT>
class madness::WorldDCSingleOwnerPmap< keyT >

Places every key on one fixed rank (all ranks agree on the owner).

Moves a container's whole content onto one rank, so a cross-world copy is a single fetch. Distribution type stays Distributed; see single_owner().

Constructor & Destructor Documentation

◆ WorldDCSingleOwnerPmap()

template<typename keyT >
madness::WorldDCSingleOwnerPmap< keyT >::WorldDCSingleOwnerPmap ( ProcessID  owner)
inline

Member Function Documentation

◆ owner()

template<typename keyT >
ProcessID madness::WorldDCSingleOwnerPmap< keyT >::owner ( const keyT key) const
inlineoverridevirtual

Maps key to processor.

Parameters
[in]keyKey for container
Returns
Processor that logically owns the key

Implements madness::WorldDCPmapInterface< keyT >.

References madness::WorldDCSingleOwnerPmap< keyT >::owner_.

◆ single_owner()

template<typename keyT >
ProcessID madness::WorldDCSingleOwnerPmap< keyT >::single_owner ( ) const
inlineoverridevirtual

The one rank every key maps to on every process, or -1. Lets a cross-world copy fetch from one owner instead of polling all ranks. Stronger than WorldDCLocalPmap, whose owner is the calling rank.

Reimplemented from madness::WorldDCPmapInterface< keyT >.

References madness::WorldDCSingleOwnerPmap< keyT >::owner_.

Member Data Documentation

◆ owner_

template<typename keyT >
const ProcessID madness::WorldDCSingleOwnerPmap< keyT >::owner_
private

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