A multiple-producer, multiple-consumer, thread-safe queue implemented using SystemC primitives The MTQueue is used as the input buffer in the NPU modules. More...

#include <MTQueue.h>

+ Inheritance diagram for MTQueue< T >:
+ Collaboration diagram for MTQueue< T >:

Public Member Functions

 MTQueue ()
Construct a MTQueue.
 
pop ()
Pop the top element from the MTQueue and return a copy. More...
 
void pop (T &item)
Pop the top element from the MTQueue and copy it into the output argument. More...
 
void push (const T &item)
Push an item onto the MTQueue. More...
 
void push (T &&item)
Push an item onto the MTQueue (explicit move) More...
 
void size (int &qsize)
 

Detailed Description

template<typename T>
class MTQueue< T >

A multiple-producer, multiple-consumer, thread-safe queue implemented using SystemC primitives The MTQueue is used as the input buffer in the NPU modules.

Member Function Documentation

template<typename T>
T MTQueue< T >::pop ( )
inline

Pop the top element from the MTQueue and return a copy.

Returns
Copy of the top element
template<typename T>
void MTQueue< T >::pop ( T &  item)
inline

Pop the top element from the MTQueue and copy it into the output argument.

Parameters
Outputargument
template<typename T>
void MTQueue< T >::push ( const T &  item)
inline

Push an item onto the MTQueue.

Parameters
Itemto push

+ Here is the caller graph for this function:

template<typename T>
void MTQueue< T >::push ( T &&  item)
inline

Push an item onto the MTQueue (explicit move)

Parameters
Itemto move

The documentation for this class was generated from the following file:
  • /home/lemniscate/workspace/PFPSim/pfpsim/core/MTQueue.h