Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
lib::test::anonymous_namespace{sync-barrier-test.cpp} Namespace Reference

Classes

class  TestThread
 A test thread to perform a summation protocol including synchronisation points. More...
 

Functions

template<class CON >
uint sumLocals (CON const &threads)
 sum up all localSum fields from all TestThread instances in a container
 

Variables

const uint NUM_THREADS = 256
 
atomic_uint stage1 {0}
 
atomic_uint stage2 {0}
 
atomic_uint finish {0}
 
SyncBarrier interThread {NUM_THREADS }
 
SyncBarrier afterThread {NUM_THREADS+1}
 

Function Documentation

◆ sumLocals()

template<class CON >
uint sumLocals ( CON const &  threads)

sum up all localSum fields from all TestThread instances in a container

Definition at line 87 of file sync-barrier-test.cpp.

References lib::explore(), TestThread::localSum, and sumLocals().

Referenced by sumLocals().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ NUM_THREADS

const uint NUM_THREADS = 256

Definition at line 42 of file sync-barrier-test.cpp.

◆ stage1

atomic_uint stage1 {0}

Definition at line 44 of file sync-barrier-test.cpp.

Referenced by TestThread::TestThread().

◆ stage2

atomic_uint stage2 {0}

Definition at line 45 of file sync-barrier-test.cpp.

Referenced by TestThread::TestThread().

◆ finish

atomic_uint finish {0}

Definition at line 46 of file sync-barrier-test.cpp.

Referenced by TestThread::TestThread().

◆ interThread

SyncBarrier interThread {NUM_THREADS }

Definition at line 48 of file sync-barrier-test.cpp.

Referenced by TestThread::TestThread().

◆ afterThread

SyncBarrier afterThread {NUM_THREADS+1}

Definition at line 49 of file sync-barrier-test.cpp.

Referenced by TestThread::TestThread().