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. | |
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 ProcessID | owner (const keyT &key) const =0 |
Maps key to processor. | |
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 | |
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(), sum, and madness::WorldGopInterface::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 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 TestPmap, LevelPmap, LevelPmap, LevelPmapX, PartitionPmap, madness::MyPmap< D >, madness::SimplePmap< keyT >, madness::LevelPmap< keyT >, madness::LBDeuxPmap< NDIM >, madness::WorldDCDefaultPmap< keyT, hashfunT >, and madness::WorldDCLocalPmap< keyT, hashfunT >.
|
inlinevirtual |
Reimplemented in madness::LBDeuxPmap< NDIM >, and madness::MyPmap< D >.
|
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 |