GlobalMemorySlot Class Reference

HiCR: HiCR::backend::mpi::GlobalMemorySlot Class Reference
HiCR
HiCR::backend::mpi::GlobalMemorySlot Class Referencefinal

#include <globalMemorySlot.hpp>

Inheritance diagram for HiCR::backend::mpi::GlobalMemorySlot:
HiCR::GlobalMemorySlot

Public Member Functions

 GlobalMemorySlot (int rank, const HiCR::GlobalMemorySlot::tag_t globalTag=0, const HiCR::GlobalMemorySlot::globalKey_t globalKey=0, std::shared_ptr< HiCR::LocalMemorySlot > sourceLocalMemorySlot=nullptr)
 
 ~GlobalMemorySlot () override=default
 
__INLINE__ const int getRank ()
 
__INLINE__ std::unique_ptr< MPI_Win > & getDataWindow ()
 
__INLINE__ std::unique_ptr< MPI_Win > & getRecvMessageCountWindow ()
 
__INLINE__ std::unique_ptr< MPI_Win > & getSentMessageCountWindow ()
 
__INLINE__ bool getLockAcquiredValue () const
 
__INLINE__ void setLockAcquiredValue (const bool value)
 
- Public Member Functions inherited from HiCR::GlobalMemorySlot
 GlobalMemorySlot (const tag_t globalTag=0, const globalKey_t globalKey=0, std::shared_ptr< HiCR::LocalMemorySlot > sourceLocalMemorySlot=nullptr)
 
__INLINE__ tag_t getGlobalTag () const noexcept
 
__INLINE__ globalKey_t getGlobalKey () const noexcept
 
__INLINE__ std::shared_ptr< HiCR::LocalMemorySlotgetSourceLocalMemorySlot () noexcept
 

Additional Inherited Members

- Public Types inherited from HiCR::GlobalMemorySlot
using globalKey_t = uint64_t
 
using tag_t = uint64_t
 

Detailed Description

This class represents the definition for a Global Memory Slot resource for the MPI backend:

Constructor & Destructor Documentation

◆ GlobalMemorySlot()

HiCR::backend::mpi::GlobalMemorySlot::GlobalMemorySlot ( int  rank,
const HiCR::GlobalMemorySlot::tag_t  globalTag = 0,
const HiCR::GlobalMemorySlot::globalKey_t  globalKey = 0,
std::shared_ptr< HiCR::LocalMemorySlot sourceLocalMemorySlot = nullptr 
)
inline

Constructor for a MemorySlot class for the MPI backend

Parameters
[in]rankRank to which this memory slot belongs
[in]globalTagFor global memory slots, indicates the subset of global memory slots this belongs to
[in]globalKeyUnique identifier for that memory slot that this slot occupies.
[in]sourceLocalMemorySlotThe local memory slot (if applicable) from whence this global memory slot is created

◆ ~GlobalMemorySlot()

HiCR::backend::mpi::GlobalMemorySlot::~GlobalMemorySlot ( )
overridevirtualdefault

Default destructor

Reimplemented from HiCR::GlobalMemorySlot.

Member Function Documentation

◆ getDataWindow()

__INLINE__ std::unique_ptr< MPI_Win > & HiCR::backend::mpi::GlobalMemorySlot::getDataWindow ( )
inline

If this is a global slot, it returns a pointer to the MPI window for the actual memory slot data

Returns
A pointer to the MPI window for the actual memory slot data

◆ getLockAcquiredValue()

__INLINE__ bool HiCR::backend::mpi::GlobalMemorySlot::getLockAcquiredValue ( ) const
inline

Returns whether the memory slot lock has been acquired by the current MPI instance

Returns
The internal state of _lockAcquired

◆ getRank()

__INLINE__ const int HiCR::backend::mpi::GlobalMemorySlot::getRank ( )
inline

Returns the rank to which this memory slot belongs

Returns
The rank to which this memory slot belongs

◆ getRecvMessageCountWindow()

__INLINE__ std::unique_ptr< MPI_Win > & HiCR::backend::mpi::GlobalMemorySlot::getRecvMessageCountWindow ( )
inline

If this is a global slot, it returns a pointer to the MPI window for the received message count

Returns
A pointer to the MPI window for the received message count

◆ getSentMessageCountWindow()

__INLINE__ std::unique_ptr< MPI_Win > & HiCR::backend::mpi::GlobalMemorySlot::getSentMessageCountWindow ( )
inline

If this is a global slot, it returns a pointer to the MPI window for the sent message count

Returns
A pointer to the MPI window for the sent message count

◆ setLockAcquiredValue()

__INLINE__ void HiCR::backend::mpi::GlobalMemorySlot::setLockAcquiredValue ( const bool  value)
inline

Sets memory slot lock state (whether it has been acquired by the current MPI instance or not)

Parameters
[in]valueThe internal state of _lockAcquired to set

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