Base Class Reference
HiCR
|
HiCR::channel::variableSize::Base Class Reference
#include <base.hpp>
Inheritance diagram for HiCR::channel::variableSize::Base:

Protected Member Functions | |
Base (CommunicationManager &communicationManager, const std::shared_ptr< LocalMemorySlot > &coordinationBufferForCounts, const std::shared_ptr< LocalMemorySlot > &coordinationBufferForPayloads, const size_t capacity, const size_t payloadCapacity) | |
__INLINE__ auto | getCircularBufferForCounts () const |
__INLINE__ auto | getCircularBufferForPayloads () const |
__INLINE__ auto | getCoordinationBufferForCounts () const |
__INLINE__ auto | getCoordinationBufferForPayloads () const |
![]() | |
Base (CommunicationManager &communicationManager, const std::shared_ptr< LocalMemorySlot > &coordinationBuffer, const size_t tokenSize, const size_t capacity) | |
__INLINE__ CommunicationManager * | getCommunicationManager () const |
__INLINE__ auto | getCoordinationBuffer () const |
Additional Inherited Members | |
![]() | |
__INLINE__ size_t | getTokenSize () const noexcept |
__INLINE__ size_t | getDepth () const noexcept |
__INLINE__ bool | isFull () const noexcept |
__INLINE__ bool | isEmpty () const noexcept |
__INLINE__ auto | getCircularBuffer () const noexcept |
![]() | |
static __INLINE__ size_t | getCoordinationBufferSize () noexcept |
static __INLINE__ void | initializeCoordinationBuffer (const std::shared_ptr< LocalMemorySlot > &coordinationBuffer) |
static __INLINE__ size_t | getTokenBufferSize (const size_t tokenSize, const size_t capacity) noexcept |
Detailed Description
A HiCR variable-size channel base
Constructor & Destructor Documentation
◆ Base()
|
inlineprotected |
The constructor of the extended base Channel class.
It requires the user to provide the allocated memory slots for the exchange (data) and coordination buffers.
- Parameters
-
[in] communicationManager The backend's memory manager to facilitate communication between the producer and consumer sides [in] coordinationBufferForCounts This is a small buffer that enables the consumer to signal how many payloads (as a count) it has popped. [in] coordinationBufferForPayloads This is a small buffer that enables the consumer to signal how many bytes from the payload data it has popped. [in] capacity The maximum number of elements (possibly different-sized) that can be held by this channel [in] payloadCapacity The maximum number of total bytes (including all different sized elements) that will be held by this channel
- Note
- : The token size in var-size channels is used only internally, and is passed as having a type size_t (with size sizeof(size_t)) The key extension to the base channel class is the use of an extended circular buffer instead of a circular buffer. This is because we need to manage payload head and tail in addition to the head an tail pointers for different elements.
Member Function Documentation
◆ getCircularBufferForCounts()
|
inlineprotected |
Gets the internal circular buffer used for token counts
- Returns
- the internal circular buffer used for token counts
◆ getCircularBufferForPayloads()
|
inlineprotected |
Gets the internal circular buffer used for token payloads
- Returns
- the internal circular buffer used for token payloads
◆ getCoordinationBufferForCounts()
|
inlineprotected |
Gets the internal coordination buffer used for token counts
- Returns
- the internal coordination buffer used for token counts
◆ getCoordinationBufferForPayloads()
|
inlineprotected |
Gets the internal coordination buffer used for token payloads
- Returns
- the internal coordination buffer used for token payloads
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/frontends/channel/variableSize/base.hpp
Generated by