MADNESS
version 0.9
|
Simplified thread wrapper to hide pthread complexity. More...
#include <worldthread.h>
Public Member Functions | |
Thread () | |
Default constructor ... must invoke start() to actually begin the thread. More... | |
Thread (void *(*f)(void *), void *args=0) | |
Create a thread and start it running f(args) More... | |
void | start (void *(*f)(void *), void *args=0) |
virtual | ~Thread () |
Public Member Functions inherited from madness::ThreadBase | |
ThreadBase () | |
Default constructor ... must invoke start() to actually begin the thread. More... | |
virtual | ~ThreadBase () |
void | start () |
Start the thread running. More... | |
const pthread_t & | get_id () const |
Get the pthread id of this thread (if running) More... | |
int | get_pool_thread_index () const |
Get index of thread in ThreadPool (0,...,nthread-1) or -1 if not in ThreadPool. More... | |
int | cancel () const |
Cancel this thread. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from madness::ThreadBase | |
static void | exit () |
A thread can call this to terminate its execution. More... | |
static int | num_hw_processors () |
Get no. of actual hardware processors. More... | |
static void | set_affinity_pattern (const bool bind[3], const int cpu[3]) |
Specify the affinity pattern or how to bind threads to cpus. More... | |
static void | set_affinity (int logical_id, int ind=-1) |
static ThreadBase * | this_thread () |
Simplified thread wrapper to hide pthread complexity.
|
inline |
Default constructor ... must invoke start()
to actually begin the thread.
|
inline |
Create a thread and start it running f(args)
References madness::ThreadBase::start().
|
inlinevirtual |
|
inline |
References madness::ThreadBase::start().