MADNESS  0.10.1
Public Types | Public Member Functions | Private Attributes | List of all members
madness::WorldDCPmapInterface< keyT > Class Template Referenceabstract

Interface to be provided by any process map. More...

#include <worlddc.h>

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

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< ptrTptrs
 

Detailed Description

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

Interface to be provided by any process map.

Member Typedef Documentation

◆ ptrT

template<typename keyT >
typedef WorldDCRedistributeInterface<keyT>* madness::WorldDCPmapInterface< keyT >::ptrT

Constructor & Destructor Documentation

◆ ~WorldDCPmapInterface()

template<typename keyT >
virtual madness::WorldDCPmapInterface< keyT >::~WorldDCPmapInterface ( )
inlinevirtual

Member Function Documentation

◆ deregister_callback()

template<typename keyT >
void madness::WorldDCPmapInterface< keyT >::deregister_callback ( ptrT  ptr)
inline

Deregisters object for receipt of redistribute callbacks.

Parameters
[in]ptrPointer to class derived from WorldDCRedistributedInterface

References madness::WorldDCPmapInterface< keyT >::ptrs.

◆ global_size()

template<typename keyT >
std::size_t madness::WorldDCPmapInterface< keyT >::global_size ( World world) const
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().

◆ local_size()

template<typename keyT >
std::size_t madness::WorldDCPmapInterface< keyT >::local_size ( ) const
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().

◆ owner()

template<typename keyT >
virtual ProcessID madness::WorldDCPmapInterface< keyT >::owner ( const keyT &  key) const
pure virtual

◆ print()

template<typename keyT >
virtual void madness::WorldDCPmapInterface< keyT >::print ( ) const
inlinevirtual

◆ print_data_sizes()

template<typename keyT >
void madness::WorldDCPmapInterface< keyT >::print_data_sizes ( World world,
const std::string  msg = "" 
) const
inline

◆ redistribute()

template<typename keyT >
void madness::WorldDCPmapInterface< keyT >::redistribute ( World world,
const std::shared_ptr< WorldDCPmapInterface< keyT >> &  newpmap 
)
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.

Parameters
[in]worldThe associated world
[in]newpmapThe new process map

References madness::WorldGopInterface::fence(), madness::World::gop, madness::WorldDCPmapInterface< keyT >::print_data_sizes(), and madness::WorldDCPmapInterface< keyT >::ptrs.

◆ register_callback()

template<typename keyT >
void madness::WorldDCPmapInterface< keyT >::register_callback ( ptrT  ptr)
inline

Registers object for receipt of redistribute callbacks.

Parameters
[in]ptrPointer to class derived from WorldDCRedistributedInterface

References madness::WorldDCPmapInterface< keyT >::ptrs.

Member Data Documentation

◆ ptrs

template<typename keyT >
std::set<ptrT> madness::WorldDCPmapInterface< keyT >::ptrs
private

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