SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends | List of all members
ThreadPool Class Reference

#include <ThreadPool.h>

Public Member Functions

 ThreadPool (const char *name)
 
 ~ThreadPool ()
 Destroy the pool and shutdown all threads. More...
 
void parallel (const ParallelBase &helper, int nthreads)
 
template<class T >
void parallel (T *ptr, void(T::*pmf)(int), int numThreads)
 
template<class T , class Arg1 >
void parallel (T *ptr, void(T::*pmf)(int, Arg1), int numThreads, Arg1 a1)
 Another overloaded version of parallel that passes 1 argument. More...
 
template<class T , class Arg1 , class Arg2 >
void parallel (T *ptr, void(T::*pmf)(int, Arg1, Arg2), int numThreads, Arg1 a1, Arg2 a2)
 Another overloaded version of parallel that passes 2 arguments. More...
 
template<class T , class Arg1 , class Arg2 , class Arg3 >
void parallel (T *ptr, void(T::*pmf)(int, Arg1, Arg2, Arg3), int numThreads, Arg1 a1, Arg2 a2, Arg3 a3)
 Another overloaded version of parallel that passes 3 arguments. More...
 

Friends

class ThreadPoolHelper
 

Constructor & Destructor Documentation

ThreadPool ( const char *  name)

Create a thread pool. name should be a static string which describes the primitive for debugging purposes.

~ThreadPool ( )

Destroy the pool and shutdown all threads.

Member Function Documentation

void parallel ( const ParallelBase helper,
int  nthreads 
)

Start up several threads that will run in parallel. The caller will block until all of the threads return.

void parallel ( T *  ptr,
void(T::*)(int)  pmf,
int  numThreads 
)
inline

Start up several threads that will run in parallel. The caller will block until all of the threads return.

void parallel ( T *  ptr,
void(T::*)(int, Arg1)  pmf,
int  numThreads,
Arg1  a1 
)
inline

Another overloaded version of parallel that passes 1 argument.

void parallel ( T *  ptr,
void(T::*)(int, Arg1, Arg2)  pmf,
int  numThreads,
Arg1  a1,
Arg2  a2 
)
inline

Another overloaded version of parallel that passes 2 arguments.

void parallel ( T *  ptr,
void(T::*)(int, Arg1, Arg2, Arg3)  pmf,
int  numThreads,
Arg1  a1,
Arg2  a2,
Arg3  a3 
)
inline

Another overloaded version of parallel that passes 3 arguments.

Friends And Related Function Documentation

friend class ThreadPoolHelper
friend

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