MADNESS 0.10.1
madness::WorldDCDefaultPmap< keyT, hashfunT > Class Template Reference

Default process map is "random" using madness::hash(key). More...

#include <worlddc.h>

Inheritance diagram for madness::WorldDCDefaultPmap< keyT, hashfunT >:
Collaboration diagram for madness::WorldDCDefaultPmap< keyT, hashfunT >:

Public Member Functions

 WorldDCDefaultPmap (World &world, const hashfunT &hf=hashfunT())
ProcessID owner (const keyT &key) const
 Maps key to processor.
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.
virtual ProcessID single_owner () const

Private Attributes

hashfunT hashfun
const int nproc

Additional Inherited Members

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

Detailed Description

template<typename keyT, typename hashfunT = Hash<keyT>>
class madness::WorldDCDefaultPmap< keyT, hashfunT >

Default process map is "random" using madness::hash(key).

Constructor & Destructor Documentation

◆ WorldDCDefaultPmap()

template<typename keyT, typename hashfunT = Hash<keyT>>
madness::WorldDCDefaultPmap< keyT, hashfunT >::WorldDCDefaultPmap ( World & world,
const hashfunT & hf = hashfunT() )
inline

References hashfun, and nproc.

Member Function Documentation

◆ owner()

template<typename keyT, typename hashfunT = Hash<keyT>>
ProcessID madness::WorldDCDefaultPmap< keyT, hashfunT >::owner ( const keyT & key) const
inlinevirtual

Maps key to processor.

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

Implements madness::WorldDCPmapInterface< keyT >.

References hashfun, and nproc.

Member Data Documentation

◆ hashfun

template<typename keyT, typename hashfunT = Hash<keyT>>
hashfunT madness::WorldDCDefaultPmap< keyT, hashfunT >::hashfun
private

Referenced by WorldDCDefaultPmap(), and owner().

◆ nproc

template<typename keyT, typename hashfunT = Hash<keyT>>
const int madness::WorldDCDefaultPmap< keyT, hashfunT >::nproc
private

Referenced by WorldDCDefaultPmap(), and owner().


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