Thrill  0.1
FlowControlChannelManager Class Reference

Detailed Description

Definition at line 29 of file flow_control_manager.hpp.

+ Collaboration diagram for FlowControlChannelManager:

#include <flow_control_manager.hpp>

Public Member Functions

 FlowControlChannelManager (Group &group, size_t local_worker_count)
 Initializes a certain count of flow control channels. More...
 
FlowControlChannelGetFlowControlChannel (size_t thread_id)
 Gets the flow control channel for a certain thread. More...
 
std::vector< FlowControlChannel > & GetFlowControlChannels ()
 Gets all flow control channels for all threads. More...
 

Private Types

using LocalData = FlowControlChannel::LocalData
 Thread local data structure: aligned such that no cache line is shared. More...
 

Private Attributes

common::ThreadBarrier barrier_
 
std::vector< FlowControlChannelchannels_
 The flow control channels associated with this node. More...
 
std::atomic< size_t > generation_ { 0 }
 Host-global generation counter. More...
 
std::vector< LocalDatashmem_
 Array of thread local data, one for each thread. More...
 

Member Typedef Documentation

◆ LocalData

Thread local data structure: aligned such that no cache line is shared.

Definition at line 40 of file flow_control_manager.hpp.

Constructor & Destructor Documentation

◆ FlowControlChannelManager()

FlowControlChannelManager ( Group group,
size_t  local_worker_count 
)
inline

Initializes a certain count of flow control channels.

Parameters
groupThe net group to use for initialization.
local_worker_countThe count of threads to spawn flow channels for.

Definition at line 55 of file flow_control_manager.hpp.

References FlowControlChannelManager::generation_.

Member Function Documentation

◆ GetFlowControlChannel()

FlowControlChannel& GetFlowControlChannel ( size_t  thread_id)
inline

Gets the flow control channel for a certain thread.

Returns
The flow control channel for a certain thread.

Definition at line 78 of file flow_control_manager.hpp.

◆ GetFlowControlChannels()

std::vector<FlowControlChannel>& GetFlowControlChannels ( )
inline

Gets all flow control channels for all threads.

Returns
A flow channel for each thread.

Definition at line 70 of file flow_control_manager.hpp.

References FlowControlChannelManager::channels_.

Member Data Documentation

◆ barrier_

common::ThreadBarrier barrier_
private

The shared barrier used to synchronize between worker threads on this node.

Definition at line 34 of file flow_control_manager.hpp.

◆ channels_

std::vector<FlowControlChannel> channels_
private

The flow control channels associated with this node.

Definition at line 37 of file flow_control_manager.hpp.

Referenced by FlowControlChannelManager::GetFlowControlChannels().

◆ generation_

std::atomic<size_t> generation_ { 0 }
private

Host-global generation counter.

Definition at line 46 of file flow_control_manager.hpp.

Referenced by FlowControlChannelManager::FlowControlChannelManager().

◆ shmem_

std::vector<LocalData> shmem_
private

Array of thread local data, one for each thread.

Definition at line 43 of file flow_control_manager.hpp.


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