fpmas 1.6
Public Member Functions | List of all members
fpmas::synchro::hard::MutexClient< T > Class Template Reference

#include <mutex_client.h>

Inheritance diagram for fpmas::synchro::hard::MutexClient< T >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::synchro::hard::MutexClient< T >:
Collaboration graph
[legend]

Public Member Functions

 MutexClient (MpiCommunicator &comm, IdMpi &id_mpi, DataMpi &data_mpi, DataUpdateMpi &data_update_mpi, ServerPackBase &server_pack)
 
read (DistributedId, int location) override
 
void releaseRead (DistributedId, int location) override
 
acquire (DistributedId, int location) override
 
void releaseAcquire (DistributedId, const T &updated_data, int location) override
 
void lock (DistributedId, int location) override
 
void unlock (DistributedId, int location) override
 
void lockShared (DistributedId, int location) override
 
void unlockShared (DistributedId, int location) override
 
virtual T read (DistributedId id, int location)=0
 
virtual void releaseRead (DistributedId id, int location)=0
 
virtual T acquire (DistributedId id, int location)=0
 
virtual void releaseAcquire (DistributedId id, const T &updated_data, int location)=0
 
virtual void lock (DistributedId id, int location)=0
 
virtual void unlock (DistributedId id, int location)=0
 
virtual void lockShared (DistributedId id, int location)=0
 
virtual void unlockShared (DistributedId id, int location)=0
 

Detailed Description

template<typename T>
class fpmas::synchro::hard::MutexClient< T >

api::MutexClient implementation.

Constructor & Destructor Documentation

◆ MutexClient()

template<typename T >
fpmas::synchro::hard::MutexClient< T >::MutexClient ( MpiCommunicator comm,
IdMpi id_mpi,
DataMpi data_mpi,
DataUpdateMpi data_update_mpi,
ServerPackBase server_pack 
)
inline

MutexClient constructor.

Parameters
commMPI communicator
id_mpiIdMpi instance
data_mpiDataMpi instance
data_update_mpiDataUpdateMpi instance
server_packassociated server pack

Member Function Documentation

◆ read()

template<typename T >
T fpmas::synchro::hard::MutexClient< T >::read ( DistributedId  id,
int  location 
)
overridevirtual

Transmits a READ request of node id to its location.

Parameters
idof the node to read
locationrank of the process that own node id
Returns
read data

Implements fpmas::synchro::hard::api::MutexClient< T >.

◆ releaseRead()

template<typename T >
void fpmas::synchro::hard::MutexClient< T >::releaseRead ( DistributedId  id,
int  location 
)
overridevirtual

Transmits a RELEASE_READ request of node id to its location.

Parameters
idof the read node
locationrank of the process that own node id

Implements fpmas::synchro::hard::api::MutexClient< T >.

◆ acquire()

template<typename T >
T fpmas::synchro::hard::MutexClient< T >::acquire ( DistributedId  id,
int  location 
)
overridevirtual

Transmits an ACQUIRE request of node id to its location.

Parameters
idof the node to acquire
locationrank of the process that own node id
Returns
acquired data

Implements fpmas::synchro::hard::api::MutexClient< T >.

◆ releaseAcquire()

template<typename T >
void fpmas::synchro::hard::MutexClient< T >::releaseAcquire ( DistributedId  id,
const T &  updated_data,
int  location 
)
overridevirtual

Transmits a RELEASE_ACQUIRE request of node id to its location.

The provided updated_data is serialized and transmitted to commit write operation to the owner process.

Parameters
idof the acquired node
updated_datareference to the locally updated data
locationrank of the process that own node id

Implements fpmas::synchro::hard::api::MutexClient< T >.

◆ lock()

template<typename T >
void fpmas::synchro::hard::MutexClient< T >::lock ( DistributedId  id,
int  location 
)
overridevirtual

Transmits a LOCK request of node id to its location.

Parameters
idof the node to lock
locationrank of the process that own node id

Implements fpmas::synchro::hard::api::MutexClient< T >.

◆ unlock()

template<typename T >
void fpmas::synchro::hard::MutexClient< T >::unlock ( DistributedId  id,
int  location 
)
overridevirtual

Transmits an UNLOCK request of node id to its location.

Parameters
idof the locked node
locationrank of the process that own node id

Implements fpmas::synchro::hard::api::MutexClient< T >.

◆ lockShared()

template<typename T >
void fpmas::synchro::hard::MutexClient< T >::lockShared ( DistributedId  id,
int  location 
)
overridevirtual

Transmits a LOCK_SHARED request of node id to its location.

Parameters
idof the node to share lock
locationrank of the process that own node id

Implements fpmas::synchro::hard::api::MutexClient< T >.

◆ unlockShared()

template<typename T >
void fpmas::synchro::hard::MutexClient< T >::unlockShared ( DistributedId  id,
int  location 
)
overridevirtual

Transmits an UNLOCK_SHARED request of node id to its location.

Parameters
idof the share locked node
locationrank of the process that own node id

Implements fpmas::synchro::hard::api::MutexClient< T >.


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