JANA2
C++ framework for multi-threaded data processing
|
To handle memory locality at different granularities, we introduce the concept of a location. More...
#include <JEventQueue.h>
Classes | |
struct | LocalQueue |
Public Member Functions | |
JEventQueue (size_t initial_capacity, size_t locations_count) | |
virtual void | Scale (size_t capacity) |
size_t | GetLocationCount () |
size_t | GetSize (size_t location) |
size_t | GetCapacity () |
void | Push (JEvent *event, size_t location) |
JEvent * | Pop (size_t location) |
Protected Attributes | |
std::vector< std::unique_ptr< LocalQueue > > | m_local_queues |
size_t | m_capacity |
To handle memory locality at different granularities, we introduce the concept of a location.
Each thread belongs to exactly one location, represented by contiguous unsigned ints starting at 0. While JArrows are wired to one logical JEventQueue, threads interact with the physical LocalQueue corresponding to their location. Locations prevent events from crossing NUMA domains as they get picked up by different worker threads.