/home/runner/work/HiCR/HiCR/include/hicr/frontends/channel/fixedSize/mpsc/nonlocking/consumer.hpp Source File
HiCR
|
consumer.hpp
Go to the documentation of this file.
78 new fixedSize::SPSC::Consumer(communicationManager, tokenBuffers[i], internalCoordinationBuffers[i], producerCoordinationBuffers[i], tokenSize, capacity));
108 if (_channelPushes.empty()) HICR_THROW_RUNTIME("Attempting to peek position (%lu) but supporting queue has size (%lu)", pos, _channelPushes.size());
111 if (channelId >= _spscList.size()) { HICR_THROW_LOGIC("channelId (%lu) >= _spscList.size() (%lu)", channelId, _spscList.size()); }
150 HICR_THROW_RUNTIME("Attempting to pop (%lu) tokens, which is more than the number of current tokens in the channel (%lu)", n, getDepth());
197 if (getDepth() != _channelPushes.size()) { HICR_THROW_LOGIC("getDepth (%lu) != _channelPushes.size() (%lu)", getDepth(), _channelPushes.size()); }
206 [[nodiscard]] __INLINE__ std::vector<std::shared_ptr<GlobalMemorySlot>> getTokenBuffers() const { return _tokenBuffers; }
Definition communicationManager.hpp:54
virtual __INLINE__ void flushReceived()
Definition communicationManager.hpp:492
Definition consumer.hpp:42
__INLINE__ std::array< size_t, 2 > peek(const size_t pos=0)
Definition consumer.hpp:99
__INLINE__ size_t getDepth()
Definition consumer.hpp:124
Consumer(CommunicationManager &communicationManager, std::vector< std::shared_ptr< GlobalMemorySlot > > tokenBuffers, std::vector< std::shared_ptr< LocalMemorySlot > > internalCoordinationBuffers, std::vector< std::shared_ptr< GlobalMemorySlot > > producerCoordinationBuffers, const size_t tokenSize, const size_t capacity)
Definition consumer.hpp:61
__INLINE__ void pop(const size_t n=1)
Definition consumer.hpp:145
__INLINE__ std::vector< std::shared_ptr< GlobalMemorySlot > > getTokenBuffers() const
Definition consumer.hpp:206
__INLINE__ bool isEmpty()
Definition consumer.hpp:138
__INLINE__ void updateDepth()
Definition consumer.hpp:178
Definition consumer.hpp:41
Provides a failure model and corresponding exception classes.
Provides base functionality for a fixed-size MPSC channel over HiCR.
Provides consumer functionality for a fixed size SPSC channel over HiCR.
Generated by