ug4
ug::NewLayoutCreator Class Reference

#include <new_layout_creator.h>

Classes

struct  NewSlaveNotification
 

Public Member Functions

void add_new_layouts_to (IndexLayout &newMasterLayout, IndexLayout &newSlaveLayout)
 
void create_node (const AlgebraID &globalID, int pid)
 
void create_node (const AlgebraID &globalID, size_t localIndex, int pid)
 
void create_node (size_t localIndex, int pid)
 
size_t create_slave_node (const AlgebraID &globalID, int distanceToMasterOrInner)
 
void issue (pcl::InterfaceCommunicator< IndexLayout > &communicator)
 
 NewLayoutCreator (ParallelNodes &_PN, IndexLayout &masterLayout, IndexLayout &slaveLayout)
 
void process ()
 

Private Types

typedef std::map< int, BinaryBufferBufferMap
 

Private Member Functions

void create_mark_map (IndexLayout &masterLayout)
 

Private Attributes

std::set< int > masterPIDs
 
std::map< int, std::set< size_t > > newMasters
 
std::map< int, std::vector< NewSlaveNotification > > newSlaveNotifications
 
std::map< int, std::set< size_t > > newSlaves
 
BufferMap notificationBufferMap
 
std::map< int, std::set< size_t > > notified
 map for marking nodes More...
 
ParallelNodesPN
 
std::set< int > slavePIDs
 

Member Typedef Documentation

◆ BufferMap

typedef std::map<int, BinaryBuffer> ug::NewLayoutCreator::BufferMap
private

Constructor & Destructor Documentation

◆ NewLayoutCreator()

Member Function Documentation

◆ add_new_layouts_to()

void ug::NewLayoutCreator::add_new_layouts_to ( IndexLayout newMasterLayout,
IndexLayout newSlaveLayout 
)
inline

◆ create_mark_map()

◆ create_node() [1/3]

void ug::NewLayoutCreator::create_node ( const AlgebraID globalID,
int  pid 
)
inline

References ug::ParallelNodes::global_to_local(), and PN.

Referenced by create_node().

◆ create_node() [2/3]

void ug::NewLayoutCreator::create_node ( const AlgebraID globalID,
size_t  localIndex,
int  pid 
)
inline

◆ create_node() [3/3]

void ug::NewLayoutCreator::create_node ( size_t  localIndex,
int  pid 
)
inline

◆ create_slave_node()

size_t ug::NewLayoutCreator::create_slave_node ( const AlgebraID globalID,
int  distanceToMasterOrInner 
)
inline

◆ issue()

◆ process()

Member Data Documentation

◆ masterPIDs

std::set<int> ug::NewLayoutCreator::masterPIDs
private

◆ newMasters

std::map<int, std::set<size_t> > ug::NewLayoutCreator::newMasters
private

◆ newSlaveNotifications

std::map<int, std::vector<NewSlaveNotification> > ug::NewLayoutCreator::newSlaveNotifications
private

Referenced by create_node(), and issue().

◆ newSlaves

std::map<int, std::set<size_t> > ug::NewLayoutCreator::newSlaves
private

◆ notificationBufferMap

BufferMap ug::NewLayoutCreator::notificationBufferMap
private

Referenced by issue(), and process().

◆ notified

std::map<int, std::set<size_t> > ug::NewLayoutCreator::notified
private

map for marking nodes

for each processor we need to have a list which of our master nodes exist on their processor this is important because we sometimes will need to add them to interfaces

the map serves two functions:

  • knowing which processor has copies of our own master nodes, and so constructing correct interfaces
  • knowing which notifications are sent
  • if i is a master node (that is PN.local_to_global(i).master_proc() == pcl::ProcRank()) then i in notified[pid] means: process pid already knows that i is a slave node on his processor, and this processor knows that i the associated master that means: i is in a master interface on this processor and in a slave interface on pid.
  • if is is not a master node then i in notified[pid] means: we already sent a notification to the owner of i (processor PN.local_to_global(i).master_proc()) that processor pid has a copy of i.

Referenced by create_mark_map(), create_node(), and process().

◆ PN

ParallelNodes& ug::NewLayoutCreator::PN
private

◆ slavePIDs

std::set<int> ug::NewLayoutCreator::slavePIDs
private

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