Channels
In this example, we use the Channel
frontend to exchange tokens between one/multiple producer(s) and a single consumer. This example is implemented with two backends:
include/producer.hpp
contains the semantics for the producer(s)include/consumer.hpp
contains the semantics for the consumersource/
contains variants of the main program implemented under different backends
Both the producer and consumer functions receive an instance of the HiCR::L1::MemoryManager
, for the allocation of the token and coordination buffer(s), and; an instance of HiCR::L1::CommunicationManager
, for the communication of tokens between the HICR instances.
Instantiate channels has more on allocating memory slots, making them globally available, and create channels.
For details on each example, choose one of the following: