![]() |
fpmas 1.6
|
#include <ghost_mode.h>
Public Types | |
typedef api::graph::DistributedEdge< T > | EdgeApi |
typedef api::graph::DistributedNode< T > | NodeApi |
typedef api::utils::PtrWrapper< EdgeApi > | EdgePtr |
typedef api::communication::TypedMpi< EdgePtr > | EdgeMpi |
typedef api::communication::TypedMpi< DistributedId > | IdMpi |
Public Member Functions | |
GhostSyncLinkerBase (EdgeMpi &edge_mpi, IdMpi &id_mpi, api::graph::DistributedGraph< T > &graph) | |
void | link (EdgeApi *edge) override |
void | unlink (EdgeApi *edge) override |
void | removeNode (NodeApi *node) override |
![]() | |
virtual void | link (api::graph::DistributedEdge< T > *edge)=0 |
virtual void | unlink (api::graph::DistributedEdge< T > *edge)=0 |
virtual void | removeNode (api::graph::DistributedNode< T > *node)=0 |
virtual void | synchronize ()=0 |
Protected Member Functions | |
void | synchronize_links () |
Base GhostMode SyncLinker implementation.
Link, unlink and node removal requests involving DISTANT nodes are buffered until synchronize_links() is called.
This class defines everything required to implement an api::synchro::SyncLinker that only commits link, unlink and node removal requests using collective communications. The commit operations can notably be performed using the simple synchronize_links() method. The only method not implemented is synchronize(), so that custom api::synchro::SyncLinker implementations can be defined extending this class. Notice that the synchronize() implementation can be as simple as a call to synchronize_links(), as performed by the GhostSyncLinker.
typedef api::graph::DistributedEdge<T> fpmas::synchro::ghost::GhostSyncLinkerBase< T >::EdgeApi |
DistributedEdge API
typedef api::graph::DistributedNode<T> fpmas::synchro::ghost::GhostSyncLinkerBase< T >::NodeApi |
DistributedNode API
typedef api::utils::PtrWrapper<EdgeApi> fpmas::synchro::ghost::GhostSyncLinkerBase< T >::EdgePtr |
DistributedEdge pointer wrapper
typedef api::communication::TypedMpi<EdgePtr> fpmas::synchro::ghost::GhostSyncLinkerBase< T >::EdgeMpi |
TypedMpi used to transmit Edges with MPI.
typedef api::communication::TypedMpi<DistributedId> fpmas::synchro::ghost::GhostSyncLinkerBase< T >::IdMpi |
TypedMpi used to transmit DistributedIds with MPI.
|
inline |
GhostSyncLinker constructor.
edge_mpi | EdgePtr MPI communicator |
id_mpi | DistributedId MPI communicator |
graph | reference to the associated DistributedGraph |
|
protected |
Commits currently buffered link, unlink and node removal operations.
|
overridevirtual |
If source or target node is DISTANT, edge is buffered to be committed at the next synchronize() call.
edge | linked edge |
Implements fpmas::api::synchro::SyncLinker< T >.
|
overridevirtual |
If source or target node is DISTANT, edge unlinking is buffered to be committed at the next synchronize() call.
For efficiency purpose, the edge is removed from the link buffer if it was not committed yet.
edge | unlinked edge |
Implements fpmas::api::synchro::SyncLinker< T >.
|
overridevirtual |
Notifies the specified node must be removed.
node | node to remove |
Implements fpmas::api::synchro::SyncLinker< T >.