MADNESS
0.10.1
|
Interface to be provided by any process map. More...
#include <worlddc.h>
Public Types | |
typedef WorldDCRedistributeInterface< keyT > * | ptrT |
Public Member Functions | |
virtual | ~WorldDCPmapInterface () |
void | deregister_callback (ptrT ptr) |
Deregisters object for receipt of redistribute callbacks. More... | |
std::size_t | global_size (World &world) const |
Counts global number of entries in all containers associated with this process map. More... | |
std::size_t | local_size () const |
Counts local number of entries in all containers associated with this process map. More... | |
virtual ProcessID | owner (const keyT &key) const =0 |
Maps key to processor. More... | |
virtual void | print () const |
void | print_data_sizes (World &world, const std::string msg="") const |
Prints size info to std::cout. More... | |
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. More... | |
void | register_callback (ptrT ptr) |
Registers object for receipt of redistribute callbacks. More... | |
Private Attributes | |
std::set< ptrT > | ptrs |
Interface to be provided by any process map.
typedef WorldDCRedistributeInterface<keyT>* madness::WorldDCPmapInterface< keyT >::ptrT |
|
inlinevirtual |
|
inline |
Deregisters object for receipt of redistribute callbacks.
[in] | ptr | Pointer to class derived from WorldDCRedistributedInterface |
References madness::WorldDCPmapInterface< keyT >::ptrs.
|
inline |
Counts global number of entries in all containers associated with this process map.
Collective operation with global fence
References madness::WorldGopInterface::fence(), madness::World::gop, madness::WorldDCPmapInterface< keyT >::local_size(), madness::WorldGopInterface::sum(), and madness::sum().
Referenced by madness::WorldDCPmapInterface< keyT >::print_data_sizes().
|
inline |
Counts local number of entries in all containers associated with this process map.
References madness::WorldDCPmapInterface< keyT >::ptrs, and madness::sum().
Referenced by madness::WorldDCPmapInterface< keyT >::global_size(), and madness::WorldDCPmapInterface< keyT >::print_data_sizes().
|
pure virtual |
Maps key to processor.
[in] | key | Key for container |
Implemented in madness::WorldDCLocalPmap< keyT, hashfunT >, madness::WorldDCDefaultPmap< keyT, hashfunT >, madness::LBDeuxPmap< NDIM >, madness::LevelPmap< keyT >, madness::SimplePmap< keyT >, madness::MyPmap< D >, PartitionPmap, LevelPmapX, LevelPmap, and TestPmap.
|
inlinevirtual |
Reimplemented in madness::MyPmap< D >, and madness::LBDeuxPmap< NDIM >.
|
inline |
Prints size info to std::cout.
Collective operation with global fence
References madness::WorldGopInterface::fence(), madness::WorldDCPmapInterface< keyT >::global_size(), madness::World::gop, madness::WorldDCPmapInterface< keyT >::local_size(), madness::print(), madness::World::rank(), madness::World::size(), and madness::WorldGopInterface::sum().
Referenced by madness::WorldDCPmapInterface< keyT >::redistribute().
|
inline |
Invoking this switches all registered objects from this process map to the new one.
After invoking this routine all objects will be registered with the new map and no objects will be registered in the current map.
[in] | world | The associated world |
[in] | newpmap | The new process map |
References madness::WorldGopInterface::fence(), madness::World::gop, madness::WorldDCPmapInterface< keyT >::print_data_sizes(), and madness::WorldDCPmapInterface< keyT >::ptrs.
|
inline |
Registers object for receipt of redistribute callbacks.
[in] | ptr | Pointer to class derived from WorldDCRedistributedInterface |
References madness::WorldDCPmapInterface< keyT >::ptrs.
|
private |