MADNESS 0.10.1
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
madness::MyPmap< D > Class Template Reference

Procmap implemented using Tree of TreeCoords. More...

#include <mypmap.h>

Inheritance diagram for madness::MyPmap< D >:
Inheritance graph
[legend]
Collaboration diagram for madness::MyPmap< D >:
Collaboration graph
[legend]

Public Member Functions

 MyPmap ()
 
 MyPmap (const MyPmap< D > &other)
 
 MyPmap (World &world)
 
 MyPmap (World &world, std::vector< TreeCoords< D > > v)
 
 MyPmap (World &world, unsigned int map_type, int n=100)
 
MyPmap< D > & operator= (const MyPmap< D > &other)
 
ProcessID owner (const KeyD &key) const
 Find the owner of a given key.
 
void print () const
 
- Public Member Functions inherited from madness::WorldDCPmapInterface< Key< D > >
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.
 
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< D > > > &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.
 

Static Public Member Functions

static bool costmapcmp (const std::pair< KeyD, double > &a, const std::pair< KeyD, double > &b)
 

Private Types

typedef Key< DKeyD
 

Private Member Functions

void build_tree_map (std::vector< TreeCoords< D > > v)
 private method that builds the Tree underlying the procmap
 
ProcessID not_so_simple_hash (const KeyD &key) const
 
void prepare_not_so_simple_map (World &world)
 
ProcessID simple_hash (const KeyD &key) const
 

Private Attributes

unsigned int map_type
 
const int n
 
const int nproc
 
Tensor< ProcessIDsimple_key_map
 
std::shared_ptr< ProcMapImpl< D > > tree_map
 

Additional Inherited Members

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

Detailed Description

template<int D>
class madness::MyPmap< D >

Procmap implemented using Tree of TreeCoords.

Member Typedef Documentation

◆ KeyD

template<int D>
typedef Key<D> madness::MyPmap< D >::KeyD
private

Constructor & Destructor Documentation

◆ MyPmap() [1/5]

template<int D>
madness::MyPmap< D >::MyPmap ( )
inline

◆ MyPmap() [2/5]

template<int D>
madness::MyPmap< D >::MyPmap ( World world)
inline

◆ MyPmap() [3/5]

template<int D>
madness::MyPmap< D >::MyPmap ( World world,
unsigned int  map_type,
int  n = 100 
)
inline

◆ MyPmap() [4/5]

template<int D>
madness::MyPmap< D >::MyPmap ( World world,
std::vector< TreeCoords< D > >  v 
)
inline

References v.

◆ MyPmap() [5/5]

template<int D>
madness::MyPmap< D >::MyPmap ( const MyPmap< D > &  other)
inline

Member Function Documentation

◆ build_tree_map()

template<int D>
void madness::MyPmap< D >::build_tree_map ( std::vector< TreeCoords< D > >  v)
inlineprivate

private method that builds the Tree underlying the procmap

References v.

◆ costmapcmp()

template<int D>
static bool madness::MyPmap< D >::costmapcmp ( const std::pair< KeyD, double > &  a,
const std::pair< KeyD, double > &  b 
)
inlinestatic

References a, and b.

◆ not_so_simple_hash()

template<int D>
ProcessID madness::MyPmap< D >::not_so_simple_hash ( const KeyD key) const
inlineprivate

◆ operator=()

template<int D>
MyPmap< D > & madness::MyPmap< D >::operator= ( const MyPmap< D > &  other)
inline

◆ owner()

template<int D>
ProcessID madness::MyPmap< D >::owner ( const KeyD key) const
inlinevirtual

Find the owner of a given key.

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

◆ prepare_not_so_simple_map()

template<int D>
void madness::MyPmap< D >::prepare_not_so_simple_map ( World world)
inlineprivate

◆ print()

template<int D>
void madness::MyPmap< D >::print ( ) const
inlinevirtual

◆ simple_hash()

template<int D>
ProcessID madness::MyPmap< D >::simple_hash ( const KeyD key) const
inlineprivate

Member Data Documentation

◆ map_type

template<int D>
unsigned int madness::MyPmap< D >::map_type
private

◆ n

template<int D>
const int madness::MyPmap< D >::n
private

◆ nproc

template<int D>
const int madness::MyPmap< D >::nproc
private

◆ simple_key_map

template<int D>
Tensor<ProcessID> madness::MyPmap< D >::simple_key_map
private

◆ tree_map

template<int D>
std::shared_ptr< ProcMapImpl<D> > madness::MyPmap< D >::tree_map
private

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