Agora  1.2.0
Agora project
test_concurrent_queue.cc File Reference
#include <gtest/gtest.h>
#include <thread>
#include "concurrentqueue.h"
Include dependency graph for test_concurrent_queue.cc:

Classes

struct  ItemT
 

Functions

void MasterToWorkerStaticMaster (moodycamel::ConcurrentQueue< ItemT > *queue, moodycamel::ProducerToken **ptoks)
 
void MasterToWorkerStaticWorker (size_t worker_id, moodycamel::ConcurrentQueue< ItemT > *queue, moodycamel::ProducerToken *ptok)
 
 TEST (TestConcurrentQueue, MasterToWorkerStatic)
 
void WorkerToMasterMaster (moodycamel::ConcurrentQueue< ItemT > *queue)
 
void WorkerToMasterWorkerWithToken (size_t worker_id, moodycamel::ConcurrentQueue< ItemT > *queue, moodycamel::ProducerToken *ptok)
 
void WorkerToMasterWorkerWithoutToken (size_t worker_id, moodycamel::ConcurrentQueue< ItemT > *queue)
 
 TEST (TestConcurrentQueue, WorkerToMasterWithTokens)
 
 TEST (TestConcurrentQueue, WorkerToMasterWithoutTokens)
 
int main (int argc, char **argv)
 

Variables

static constexpr size_t kNumWorkers = 14
 
static constexpr size_t kMaxTestNum = (1 << 24)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ MasterToWorkerStaticMaster()

void MasterToWorkerStaticMaster ( moodycamel::ConcurrentQueue< ItemT > *  queue,
moodycamel::ProducerToken **  ptoks 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MasterToWorkerStaticWorker()

void MasterToWorkerStaticWorker ( size_t  worker_id,
moodycamel::ConcurrentQueue< ItemT > *  queue,
moodycamel::ProducerToken ptok 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TEST() [1/3]

TEST ( TestConcurrentQueue  ,
MasterToWorkerStatic   
)
Here is the call graph for this function:

◆ TEST() [2/3]

TEST ( TestConcurrentQueue  ,
WorkerToMasterWithoutTokens   
)
Here is the call graph for this function:

◆ TEST() [3/3]

TEST ( TestConcurrentQueue  ,
WorkerToMasterWithTokens   
)
Here is the call graph for this function:

◆ WorkerToMasterMaster()

void WorkerToMasterMaster ( moodycamel::ConcurrentQueue< ItemT > *  queue)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WorkerToMasterWorkerWithoutToken()

void WorkerToMasterWorkerWithoutToken ( size_t  worker_id,
moodycamel::ConcurrentQueue< ItemT > *  queue 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WorkerToMasterWorkerWithToken()

void WorkerToMasterWorkerWithToken ( size_t  worker_id,
moodycamel::ConcurrentQueue< ItemT > *  queue,
moodycamel::ProducerToken ptok 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ kMaxTestNum

constexpr size_t kMaxTestNum = (1 << 24)
staticconstexpr

◆ kNumWorkers

constexpr size_t kNumWorkers = 14
staticconstexpr