MADNESS 0.10.1
Public Member Functions | Private Attributes | List of all members
Worker Class Reference
Inheritance diagram for Worker:
Inheritance graph
[legend]
Collaboration diagram for Worker:
Collaboration graph
[legend]

Public Member Functions

 Worker (ConcurrentHashMap< int, double > &a, size_t &count, double &sum)
 
void run ()
 Function to be executed by the thread.
 
- Public Member Functions inherited from madness::ThreadBase
 ThreadBase ()
 Default constructor.
 
virtual ~ThreadBase ()
 
int cancel () const
 Cancel this thread.
 
const pthread_t & get_id () const
 Get the pthread id of this thread (if running).
 
int get_pool_thread_index () const
 Get index of this thread in ThreadPool.
 
void start ()
 Start the thread running.
 

Private Attributes

ConcurrentHashMap< int, double > & a
 
size_t & count
 
double & sum
 

Additional Inherited Members

- Static Public Member Functions inherited from madness::ThreadBase
static void exit ()
 A thread can call this to terminate its execution.
 
static int num_hw_processors ()
 Get number of actual hardware processors.
 
static ThreadBasethis_thread ()
 

Constructor & Destructor Documentation

◆ Worker()

Worker::Worker ( ConcurrentHashMap< int, double > &  a,
size_t &  count,
double &  sum 
)
inline

Member Function Documentation

◆ run()

void Worker::run ( )
inlinevirtual

Function to be executed by the thread.

Override this to do work.

Implements madness::ThreadBase.

References a, count, do_test_random(), ndone, and sum.

Member Data Documentation

◆ a

ConcurrentHashMap<int,double>& Worker::a
private

Referenced by run().

◆ count

size_t& Worker::count
private

Referenced by run().

◆ sum

double& Worker::sum
private

Referenced by run().


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