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

#include <worlddc.h>

Inheritance diagram for madness::WorldDCNodeReplicatedPmap< keyT, hashfunT >:
Inheritance graph
[legend]
Collaboration diagram for madness::WorldDCNodeReplicatedPmap< keyT, hashfunT >:
Collaboration graph
[legend]

Public Member Functions

 WorldDCNodeReplicatedPmap (World &world, const std::map< std::string, std::vector< long > > ranks_per_host)
 
DistributionType distribution_type () const override
 by default the map is distributed
 
ProcessID owner (const keyT &key) const override
 owner is the lowest rank on the node, same for all keys
 
- Public Member Functions inherited from madness::WorldDCPmapInterface< keyT >
virtual ~WorldDCPmapInterface ()
 
void deregister_callback (ptrT ptr)
 Deregisters object for receipt of redistribute callbacks.
 
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

ProcessID myowner
 

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::WorldDCNodeReplicatedPmap< keyT, hashfunT >

node-replicated map will return the lowest rank on the node as owner

Constructor & Destructor Documentation

◆ WorldDCNodeReplicatedPmap()

template<typename keyT , typename hashfunT = Hash<keyT>>
madness::WorldDCNodeReplicatedPmap< keyT, hashfunT >::WorldDCNodeReplicatedPmap ( World world,
const std::map< std::string, std::vector< long > >  ranks_per_host 
)
inlineexplicit

ctor makes a map of all ranks to their owners (lowest rank on the host) calls a fence

Parameters
[in]worldthe associated world

References madness::lowest_rank_on_host_of_rank(), madness::WorldDCNodeReplicatedPmap< keyT, hashfunT >::myowner, madness::World::rank(), and madness::ranks_per_host().

Member Function Documentation

◆ distribution_type()

template<typename keyT , typename hashfunT = Hash<keyT>>
DistributionType madness::WorldDCNodeReplicatedPmap< keyT, hashfunT >::distribution_type ( ) const
inlineoverridevirtual

by default the map is distributed

Reimplemented from madness::WorldDCPmapInterface< keyT >.

References madness::NodeReplicated.

◆ owner()

template<typename keyT , typename hashfunT = Hash<keyT>>
ProcessID madness::WorldDCNodeReplicatedPmap< keyT, hashfunT >::owner ( const keyT key) const
inlineoverridevirtual

owner is the lowest rank on the node, same for all keys

Implements madness::WorldDCPmapInterface< keyT >.

References madness::WorldDCNodeReplicatedPmap< keyT, hashfunT >::myowner.

Member Data Documentation

◆ myowner

template<typename keyT , typename hashfunT = Hash<keyT>>
ProcessID madness::WorldDCNodeReplicatedPmap< keyT, hashfunT >::myowner
private

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