CommunicationManager Class Reference
|
HiCR
|
HiCR::backend::pthreads::CommunicationManager Class Referencefinal
#include <communicationManager.hpp>
Inheritance diagram for HiCR::backend::pthreads::CommunicationManager:
Public Member Functions | |
| CommunicationManager (Core &core) | |
| ~CommunicationManager ()=default | |
| __INLINE__ std::shared_ptr< HiCR::GlobalMemorySlot > | getGlobalMemorySlotImpl (const HiCR::backend::hwloc::GlobalMemorySlot::tag_t tag, const HiCR::backend::hwloc::GlobalMemorySlot::globalKey_t globalKey) override |
| __INLINE__ std::shared_ptr< HiCR::GlobalMemorySlot > | promoteLocalMemorySlot (const std::shared_ptr< HiCR::LocalMemorySlot > &memorySlot, HiCR::GlobalMemorySlot::tag_t tag) override |
| __INLINE__ void | destroyPromotedGlobalMemorySlot (const std::shared_ptr< HiCR::GlobalMemorySlot > &memorySlot) override |
Public Member Functions inherited from HiCR::CommunicationManager | |
| __INLINE__ void | exchangeGlobalMemorySlots (GlobalMemorySlot::tag_t tag, const std::vector< globalKeyMemorySlotPair_t > &memorySlots) |
| __INLINE__ std::shared_ptr< GlobalMemorySlot > | getGlobalMemorySlot (GlobalMemorySlot::tag_t tag, GlobalMemorySlot::globalKey_t globalKey) |
| virtual uint8_t * | serializeGlobalMemorySlot (const std::shared_ptr< HiCR::GlobalMemorySlot > &globalSlot) const |
| virtual std::shared_ptr< GlobalMemorySlot > | deserializeGlobalMemorySlot (uint8_t *buffer, GlobalMemorySlot::tag_t tag) |
| virtual std::shared_ptr< GlobalMemorySlot > | promoteLocalMemorySlot (const std::shared_ptr< LocalMemorySlot > &localMemorySlot, GlobalMemorySlot::tag_t tag) |
| __INLINE__ void | deregisterGlobalMemorySlot (const std::shared_ptr< GlobalMemorySlot > &memorySlot) |
| __INLINE__ void | destroyGlobalMemorySlot (const std::shared_ptr< GlobalMemorySlot > &memorySlot) |
| virtual void | destroyPromotedGlobalMemorySlot (const std::shared_ptr< GlobalMemorySlot > &memorySlot) |
| __INLINE__ void | queryMemorySlotUpdates (std::shared_ptr< LocalMemorySlot > memorySlot) |
| __INLINE__ void | memcpy (const std::shared_ptr< LocalMemorySlot > &destination, size_t dst_offset, const std::shared_ptr< LocalMemorySlot > &source, size_t src_offset, size_t size) |
| __INLINE__ void | memcpy (const std::shared_ptr< GlobalMemorySlot > &destination, size_t dst_offset, const std::shared_ptr< LocalMemorySlot > &source, size_t src_offset, size_t size) |
| __INLINE__ void | memcpy (const std::shared_ptr< LocalMemorySlot > &destination, size_t dst_offset, const std::shared_ptr< GlobalMemorySlot > &source, size_t src_offset, size_t size) |
| __INLINE__ void | fence (GlobalMemorySlot::tag_t tag) |
| __INLINE__ void | fence (const std::shared_ptr< LocalMemorySlot > &slot, size_t expectedSent, size_t expectedRecvd) |
| __INLINE__ void | fence (const std::shared_ptr< GlobalMemorySlot > &slot, size_t expectedSent, size_t expectedRecvd) |
| __INLINE__ bool | acquireGlobalLock (const std::shared_ptr< GlobalMemorySlot > &memorySlot) |
| __INLINE__ void | releaseGlobalLock (const std::shared_ptr< GlobalMemorySlot > &memorySlot) |
| virtual __INLINE__ void | flushSent () |
| virtual __INLINE__ void | flushReceived () |
| __INLINE__ auto & | getGlobalMemorySlotTagKeyMap () |
| __INLINE__ void | setGlobalMemorySlotTagKeyMap (const HiCR::CommunicationManager::globalMemorySlotTagKeyMap_t &globalMemorySlotTagKeyMap) |
Additional Inherited Members | |
Public Types inherited from HiCR::CommunicationManager | |
| using | globalKeyMemorySlotPair_t = std::pair< GlobalMemorySlot::globalKey_t, std::shared_ptr< LocalMemorySlot > > |
| using | globalKeyToMemorySlotMap_t = std::map< GlobalMemorySlot::globalKey_t, std::shared_ptr< GlobalMemorySlot > > |
| using | globalMemorySlotTagKeyMap_t = std::map< GlobalMemorySlot::tag_t, globalKeyToMemorySlotMap_t > |
Protected Member Functions inherited from HiCR::CommunicationManager | |
| __INLINE__ void | registerGlobalMemorySlot (const std::shared_ptr< GlobalMemorySlot > &memorySlot) |
| virtual void | queryMemorySlotUpdatesImpl (std::shared_ptr< LocalMemorySlot > memorySlot)=0 |
| virtual void | deregisterGlobalMemorySlotImpl (const std::shared_ptr< GlobalMemorySlot > &memorySlot) |
| virtual void | destroyGlobalMemorySlotImpl (std::shared_ptr< GlobalMemorySlot > memorySlot)=0 |
| virtual void | memcpyImpl (const std::shared_ptr< LocalMemorySlot > &destination, size_t dst_offset, const std::shared_ptr< LocalMemorySlot > &source, size_t src_offset, size_t size) |
| virtual void | memcpyImpl (const std::shared_ptr< GlobalMemorySlot > &destination, size_t dst_offset, const std::shared_ptr< LocalMemorySlot > &source, size_t src_offset, size_t size) |
| virtual void | memcpyImpl (const std::shared_ptr< LocalMemorySlot > &destination, size_t dst_offset, const std::shared_ptr< GlobalMemorySlot > &source, size_t src_offset, size_t size) |
| virtual void | fenceImpl (const std::shared_ptr< LocalMemorySlot > &slot, size_t expectedSent, size_t expectedRcvd) |
| virtual void | fenceImpl (const std::shared_ptr< GlobalMemorySlot > &slot, size_t expectedSent, size_t expectedRcvd) |
| virtual bool | acquireGlobalLockImpl (std::shared_ptr< GlobalMemorySlot > memorySlot)=0 |
| virtual void | releaseGlobalLockImpl (std::shared_ptr< GlobalMemorySlot > memorySlot)=0 |
| __INLINE__ auto & | getGlobalMemorySlotsToDestroyPerTag () |
| __INLINE__ void | increaseMessageRecvCounter (HiCR::LocalMemorySlot &memorySlot) noexcept |
| __INLINE__ void | increaseMessageSentCounter (HiCR::LocalMemorySlot &memorySlot) noexcept |
| __INLINE__ void | setMessagesRecv (HiCR::LocalMemorySlot &memorySlot, const size_t count) noexcept |
| __INLINE__ void | setMessagesSent (HiCR::LocalMemorySlot &memorySlot, const size_t count) noexcept |
Detailed Description
Implementation of the Pthreads communication manager
This backend uses pthread-based mutexes and barriers to prevent concurrent access violations
Constructor & Destructor Documentation
◆ CommunicationManager()
|
inline |
Constructor for the communication manager class for the pthreads backend
- Parameters
-
[in] core the shared memory used to exchange global slots among other threads
◆ ~CommunicationManager()
|
virtualdefault |
The destructor deletes all created barrier/mutex locks
Reimplemented from HiCR::CommunicationManager.
Member Function Documentation
◆ destroyPromotedGlobalMemorySlot()
|
inlineoverride |
Dummy override for the deregisterGlobalMemorySlot function, for PoC development
- Parameters
-
[in] memorySlot Memory slot to deregister.
◆ getGlobalMemorySlotImpl()
|
inlineoverridevirtual |
Backend-internal implementation of the getGlobalMemorySlot function
Retrieves the map of globally registered slots
- Parameters
-
[in] tag Tag that identifies a subset of all global memory slots [in] globalKey The sorting key inside the tag subset that distinguished between registered slots
- Returns
- The map of registered global memory slots, filtered by tag and mapped by key
Implements HiCR::CommunicationManager.
◆ promoteLocalMemorySlot()
|
inlineoverride |
Promotes a local memory slot to a global memory slot. Not really needed for this backend, provided for PoC development
- Parameters
-
[in] memorySlot Local memory slot to promote [in] tag Tag to associate with the promoted global memory slot
- Returns
- The promoted global memory slot
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/backends/pthreads/communicationManager.hpp
Generated by
Public Member Functions inherited from