MADNESS 0.10.1
madness::LBDeuxPmap< NDIM > Class Template Reference

#include <lbdeux.h>

Inheritance diagram for madness::LBDeuxPmap< NDIM >:
Collaboration diagram for madness::LBDeuxPmap< NDIM >:

Public Member Functions

 LBDeuxPmap (const std::vector< pairT > &v, const ProcessID nproc)
ProcessID owner (const keyT &key) const
void print () const
Public Member Functions inherited from madness::WorldDCPmapInterface< Key< NDIM > >
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.
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< Key< NDIM > > > &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 Types

typedef mapT::const_iterator iteratorT
typedef Key< NDIM > keyT
typedef std::unordered_map< keyT, ProcessID, Hash< keyT > > mapT
typedef std::pair< keyT, ProcessID > pairT

Private Attributes

mapT map
Level max_level = 0
 Deepest level of any entry in map.

Additional Inherited Members

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

Member Typedef Documentation

◆ iteratorT

template<std::size_t NDIM>
typedef mapT::const_iterator madness::LBDeuxPmap< NDIM >::iteratorT
private

◆ keyT

template<std::size_t NDIM>
typedef Key<NDIM> madness::LBDeuxPmap< NDIM >::keyT
private

◆ mapT

template<std::size_t NDIM>
typedef std::unordered_map<keyT,ProcessID,Hash<keyT> > madness::LBDeuxPmap< NDIM >::mapT
private

◆ pairT

template<std::size_t NDIM>
typedef std::pair<keyT,ProcessID> madness::LBDeuxPmap< NDIM >::pairT
private

Constructor & Destructor Documentation

◆ LBDeuxPmap()

template<std::size_t NDIM>
madness::LBDeuxPmap< NDIM >::LBDeuxPmap ( const std::vector< pairT > & v,
const ProcessID nproc )
inline
Parameters
[in]vThe owner of each subtree root. The root key must be present, keys must be unique, and ranks must be in [0, nproc).
[in]nprocThe number of processes in the World that uses this map
Exceptions
MadnessExceptionif v is not valid

References MADNESS_CHECK_THROW, map, max_level, nproc, and v.

Member Function Documentation

◆ owner()

template<std::size_t NDIM>
ProcessID madness::LBDeuxPmap< NDIM >::owner ( const keyT & key) const
inlinevirtual
Returns
The owner of the nearest ancestor of key that is in the map, or of key itself
Exceptions
MadnessExceptionif no ancestor is in the map, which a valid key cannot cause

Implements madness::WorldDCPmapInterface< Key< NDIM > >.

References madness::FunctionDefaults< NDIM >::k, madness::Key< NDIM >::level(), MADNESS_EXCEPTION, map, max_level, madness::Key< NDIM >::parent(), and madness::print().

◆ print()

template<std::size_t NDIM>
void madness::LBDeuxPmap< NDIM >::print ( ) const
inlinevirtual

Member Data Documentation

◆ map

template<std::size_t NDIM>
mapT madness::LBDeuxPmap< NDIM >::map
private

Referenced by LBDeuxPmap(), and owner().

◆ max_level

template<std::size_t NDIM>
Level madness::LBDeuxPmap< NDIM >::max_level = 0
private

Deepest level of any entry in map.

Referenced by LBDeuxPmap(), and owner().


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