fpmas 1.6
Public Member Functions | List of all members
fpmas::synchro::ghost::GhostMode< T, Mutex > Class Template Reference

#include <ghost_mode.h>

Inheritance diagram for fpmas::synchro::ghost::GhostMode< T, Mutex >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::synchro::ghost::GhostMode< T, Mutex >:
Collaboration graph
[legend]

Public Member Functions

 GhostMode (api::graph::DistributedGraph< T > &graph, api::communication::MpiCommunicator &comm)
 
Mutex< T > * buildMutex (api::graph::DistributedNode< T > *node) override
 
GhostDataSync< T > & getDataSync () override
 
GhostSyncLinker< T > & getSyncLinker () override
 
virtual Mutex< T > * buildMutex (api::graph::DistributedNode< T > *node)=0
 
virtual SyncLinker< T > & getSyncLinker ()=0
 
virtual DataSync< T > & getDataSync ()=0
 

Detailed Description

template<typename T, template< typename > class Mutex>
class fpmas::synchro::ghost::GhostMode< T, Mutex >

Ghost SyncMode implementation.

The concept of GhostMode is that local data is updated only at each api::graph::DistributedGraph::synchronize() call by the GhostDataSync instance. Let's call a "time step" the period between two graph synchronizations. It is not guaranteed that DISTANT node data accessed within a time step is synchronized with the process that owns the node.

More importantly, **write operations on DISTANT nodes are not reported** to the hosts processes.

In consequence, the corresponding api::synchro::Mutex implementation is trivial, since (for now) we consider a single-threaded environment, so no concurrency needs to be managed since the local process necessarily access sequentially the local nodes' data.

However, link, unlink and node removal operations are allowed, and are committed "at the end of each time step" by the GhostSyncLinker instance, i.e. at each graph synchronization.

Constructor & Destructor Documentation

◆ GhostMode()

template<typename T , template< typename > class Mutex>
fpmas::synchro::ghost::GhostMode< T, Mutex >::GhostMode ( api::graph::DistributedGraph< T > &  graph,
api::communication::MpiCommunicator comm 
)
inline

GhostMode constructor.

Parameters
graphreference to the associated DistributedGraph
commMPI communicator

Member Function Documentation

◆ buildMutex()

template<typename T , template< typename > class Mutex>
Mutex< T > * fpmas::synchro::ghost::GhostMode< T, Mutex >::buildMutex ( api::graph::DistributedNode< T > *  node)
inlineoverridevirtual

Builds a new SingleThreadMutex from the specified node data.

Parameters
nodenode to which the built mutex will be associated

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

◆ getDataSync()

template<typename T , template< typename > class Mutex>
GhostDataSync< T > & fpmas::synchro::ghost::GhostMode< T, Mutex >::getDataSync ( )
inlineoverridevirtual

Returns a reference to the internal GhostDataSync instance.

Returns
reference to the DataSync instance

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

◆ getSyncLinker()

template<typename T , template< typename > class Mutex>
GhostSyncLinker< T > & fpmas::synchro::ghost::GhostMode< T, Mutex >::getSyncLinker ( )
inlineoverridevirtual

Returns a reference to the internal GhostSyncLinker instance.

Returns
reference to the SyncLinker instance

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


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