fpmas 1.6
Public Types | Public Member Functions | Protected Member Functions | List of all members
fpmas::synchro::ghost::GhostSyncLinkerBase< T > Class Template Reference

#include <ghost_mode.h>

Inheritance diagram for fpmas::synchro::ghost::GhostSyncLinkerBase< T >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::synchro::ghost::GhostSyncLinkerBase< T >:
Collaboration graph
[legend]

Public Types

typedef api::graph::DistributedEdge< T > EdgeApi
 
typedef api::graph::DistributedNode< T > NodeApi
 
typedef api::utils::PtrWrapper< EdgeApiEdgePtr
 
typedef api::communication::TypedMpi< EdgePtrEdgeMpi
 
typedef api::communication::TypedMpi< DistributedIdIdMpi
 

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
 
- Public Member Functions inherited from fpmas::api::synchro::SyncLinker< T >
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 ()
 

Detailed Description

template<typename T>
class fpmas::synchro::ghost::GhostSyncLinkerBase< T >

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.

Member Typedef Documentation

◆ EdgeApi

template<typename T >
typedef api::graph::DistributedEdge<T> fpmas::synchro::ghost::GhostSyncLinkerBase< T >::EdgeApi

DistributedEdge API

◆ NodeApi

template<typename T >
typedef api::graph::DistributedNode<T> fpmas::synchro::ghost::GhostSyncLinkerBase< T >::NodeApi

DistributedNode API

◆ EdgePtr

template<typename T >
typedef api::utils::PtrWrapper<EdgeApi> fpmas::synchro::ghost::GhostSyncLinkerBase< T >::EdgePtr

DistributedEdge pointer wrapper

◆ EdgeMpi

TypedMpi used to transmit Edges with MPI.

◆ IdMpi

TypedMpi used to transmit DistributedIds with MPI.

Constructor & Destructor Documentation

◆ GhostSyncLinkerBase()

template<typename T >
fpmas::synchro::ghost::GhostSyncLinkerBase< T >::GhostSyncLinkerBase ( EdgeMpi edge_mpi,
IdMpi id_mpi,
api::graph::DistributedGraph< T > &  graph 
)
inline

GhostSyncLinker constructor.

Parameters
edge_mpiEdgePtr MPI communicator
id_mpiDistributedId MPI communicator
graphreference to the associated DistributedGraph

Member Function Documentation

◆ synchronize_links()

template<typename T >
void fpmas::synchro::ghost::GhostSyncLinkerBase< T >::synchronize_links
protected

Commits currently buffered link, unlink and node removal operations.

◆ link()

template<typename T >
void fpmas::synchro::ghost::GhostSyncLinkerBase< T >::link ( EdgeApi edge)
overridevirtual

If source or target node is DISTANT, edge is buffered to be committed at the next synchronize() call.

Parameters
edgelinked edge

Implements fpmas::api::synchro::SyncLinker< T >.

◆ unlink()

template<typename T >
void fpmas::synchro::ghost::GhostSyncLinkerBase< T >::unlink ( EdgeApi edge)
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.

Parameters
edgeunlinked edge

Implements fpmas::api::synchro::SyncLinker< T >.

◆ removeNode()

template<typename T >
void fpmas::synchro::ghost::GhostSyncLinkerBase< T >::removeNode ( NodeApi node)
overridevirtual

Notifies the specified node must be removed.

Parameters
nodenode to remove

Implements fpmas::api::synchro::SyncLinker< T >.


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