ug4
|
Classes | |
struct | Entry |
Public Types | |
typedef Layout::Element | Element |
typedef Layout::Type | GeomObj |
typedef Layout::Interface | Interface |
typedef Interface::const_iterator | InterfaceIter |
typedef TLayout | Layout |
Public Types inherited from pcl::ICommunicationPolicy< TLayout > | |
typedef Layout::Interface | Interface |
typedef TLayout | Layout |
Public Member Functions | |
virtual bool | collect (ug::BinaryBuffer &buff, const Interface &interface) |
should write data which is associated with the interface elements to the buffer. More... | |
ComPol_NewConstrainedVerticals (DistributedGridManager *dgm, std::vector< GeomObj * > &newConstrained) | |
void | create_initial_hash_entry (GeomObj *e) |
void | exchange_data () |
virtual bool | extract (ug::BinaryBuffer &buff, const Interface &interface) |
extract data from the buffer and assigns it to the interface-elements. More... | |
std::pair< int, int > | get_h_master_info (GeomObj *o) |
virtual int | get_required_buffer_size (const Interface &interface) |
returns the size of the buffer in bytes, that will be required for interface-communication. More... | |
std::vector< int > & | other_v_masters (GeomObj *o) |
virtual | ~ComPol_NewConstrainedVerticals () |
Public Member Functions inherited from pcl::ICommunicationPolicy< TLayout > | |
virtual bool | begin_layout_collection (const Layout *pLayout) |
signals the beginning of a layout collection. More... | |
virtual bool | begin_layout_extraction (const Layout *pLayout) |
signals the beginning of a layout extraction. More... | |
virtual void | begin_level_extraction (int level) |
signals that a new layout-level will now be processed. More... | |
virtual bool | end_layout_collection (const Layout *pLayout) |
signals the end of a layout collection More... | |
virtual bool | end_layout_extraction (const Layout *pLayout) |
signals the end of a layout extraction More... | |
virtual | ~ICommunicationPolicy () |
Private Attributes | |
DistributedGridManager * | m_dgm |
bool | m_exchangeVMasterRanks |
Hash< GeomObj *, Entry > | m_hash |
bool | m_initialHandshake |
int | m_localHMasterCount |
std::vector< GeomObj * > & | m_newConstrained |
typedef Layout::Element ug::ComPol_NewConstrainedVerticals< TLayout >::Element |
typedef Layout::Type ug::ComPol_NewConstrainedVerticals< TLayout >::GeomObj |
typedef Layout::Interface ug::ComPol_NewConstrainedVerticals< TLayout >::Interface |
typedef Interface::const_iterator ug::ComPol_NewConstrainedVerticals< TLayout >::InterfaceIter |
typedef TLayout ug::ComPol_NewConstrainedVerticals< TLayout >::Layout |
|
inline |
Note that a reference to newConstrained is passed to the constructor and that its content may be changed by some methods in this class.
References ug::ComPol_NewConstrainedVerticals< TLayout >::create_initial_hash_entry(), and ug::ComPol_NewConstrainedVerticals< TLayout >::m_hash.
|
inlinevirtual |
|
inlinevirtual |
should write data which is associated with the interface elements to the buffer.
Implements pcl::ICommunicationPolicy< TLayout >.
References ug::DistributedGridManager::collect_interface_entries(), ug::DistributedGridManager::contains_status(), ug::ES_V_SLAVE, ug::ComPol_NewConstrainedVerticals< TLayout >::Entry::hmasterProcInfo, ug::ComPol_NewConstrainedVerticals< TLayout >::m_dgm, ug::ComPol_NewConstrainedVerticals< TLayout >::m_exchangeVMasterRanks, ug::ComPol_NewConstrainedVerticals< TLayout >::m_hash, ug::ComPol_NewConstrainedVerticals< TLayout >::m_initialHandshake, ug::Serialize(), and UG_ASSERT.
|
inline |
References ug::DistributedGridManager::collect_interface_entries(), ug::DistributedGridManager::contains_status(), ug::ES_H_MASTER, ug::ES_H_SLAVE, ug::ES_V_MASTER, ug::DistributedGridManager::get_assigned_grid(), ug::GetGridObjectCenter(), ug::ComPol_NewConstrainedVerticals< TLayout >::m_dgm, ug::ComPol_NewConstrainedVerticals< TLayout >::m_hash, ug::ComPol_NewConstrainedVerticals< TLayout >::m_localHMasterCount, pcl::ProcRank(), and UG_ASSERT.
Referenced by ug::ComPol_NewConstrainedVerticals< TLayout >::ComPol_NewConstrainedVerticals(), and ug::ComPol_NewConstrainedVerticals< TLayout >::extract().
|
inline |
References pcl::InterfaceCommunicator< TLayout >::communicate(), ug::DistributedGridManager::contains_status(), ug::ES_H_SLAVE, pcl::InterfaceCommunicator< TLayout >::exchange_data(), ug::DistributedGridManager::grid_layout_map(), ug::ComPol_NewConstrainedVerticals< TLayout >::Entry::hmasterProcInfo, ug::INT_V_MASTER, ug::INT_V_SLAVE, ug::LIB_GRID, ug::ComPol_NewConstrainedVerticals< TLayout >::m_dgm, ug::ComPol_NewConstrainedVerticals< TLayout >::m_exchangeVMasterRanks, ug::ComPol_NewConstrainedVerticals< TLayout >::m_hash, ug::ComPol_NewConstrainedVerticals< TLayout >::m_initialHandshake, ug::ComPol_NewConstrainedVerticals< TLayout >::m_localHMasterCount, ug::ComPol_NewConstrainedVerticals< TLayout >::m_newConstrained, pcl::ProcRank(), and UG_DLOG.
Referenced by ug::DistributedGridManager::create_missing_constrained_h_interfaces().
|
inlinevirtual |
extract data from the buffer and assigns it to the interface-elements.
If this method is called between calls to begin_layout_extraction and end_layout_extraction, the interface that is passed to this method belongs to the layout.
Implements pcl::ICommunicationPolicy< TLayout >.
References ug::DistributedGridManager::contains_status(), ug::ComPol_NewConstrainedVerticals< TLayout >::create_initial_hash_entry(), ug::Deserialize(), ug::ElementDebugInfo(), ug::ES_V_MASTER, ug::DistributedGridManager::get_assigned_grid(), ug::ComPol_NewConstrainedVerticals< TLayout >::Entry::hmasterProcInfo, ug::ComPol_NewConstrainedVerticals< TLayout >::m_dgm, ug::ComPol_NewConstrainedVerticals< TLayout >::m_exchangeVMasterRanks, ug::ComPol_NewConstrainedVerticals< TLayout >::m_hash, ug::ComPol_NewConstrainedVerticals< TLayout >::m_initialHandshake, ug::ComPol_NewConstrainedVerticals< TLayout >::m_newConstrained, ug::ComPol_NewConstrainedVerticals< TLayout >::Entry::otherVMasterRanks, pcl::ProcRank(), and UG_ASSERT.
|
inline |
returns a std::pair<int, int> where 'first' represents the h-master rank and where 'second' defines the order in which entries have to be added to the h-interface.
References ug::ComPol_NewConstrainedVerticals< TLayout >::m_hash.
Referenced by ug::DistributedGridManager::create_missing_constrained_h_interfaces().
|
inlinevirtual |
returns the size of the buffer in bytes, that will be required for interface-communication.
Determines the size of the buffer on which the extract and receive methods for the given interface will operate. If the buffer-size can't be calculated on both sides (sender and receiver) this method should return -1. This will lead to an additional communication step in which buffer-sizes will be exchanged. If the buffer-size can be calculated on both sides, it makes sense to do so, since this leads to less communication and overall improved performance. The buffer-size has to exactly match the size of required memory. Make sure that you completely fill the buffer during collect(...) and that you read all data during extract(...). The default implementation returns -1.
Reimplemented from pcl::ICommunicationPolicy< TLayout >.
|
inline |
returns the array of other v-master procs which build an interface to the local proc, if the local proc will be the new h-master proc and if it is also a v-master proc.
References ug::ComPol_NewConstrainedVerticals< TLayout >::m_hash.
Referenced by ug::DistributedGridManager::create_missing_constrained_h_interfaces().
|
private |
|
private |
|
private |
Referenced by ug::ComPol_NewConstrainedVerticals< TLayout >::collect(), ug::ComPol_NewConstrainedVerticals< TLayout >::ComPol_NewConstrainedVerticals(), ug::ComPol_NewConstrainedVerticals< TLayout >::create_initial_hash_entry(), ug::ComPol_NewConstrainedVerticals< TLayout >::exchange_data(), ug::ComPol_NewConstrainedVerticals< TLayout >::extract(), ug::ComPol_NewConstrainedVerticals< TLayout >::get_h_master_info(), and ug::ComPol_NewConstrainedVerticals< TLayout >::other_v_masters().
|
private |
|
private |
|
private |