xmsinterp
1.0
|
Implmentation of ThreadMgr. More...
Classes | |
struct | myThread |
convenience struct for threads More... | |
Public Member Functions | |
ThreadMgrImpl () | |
Constructor. | |
void | SetThreadLoopClass (BSHP< ThreadLoop > a_) override |
void | ExplicitlySetNumThreads (int a_nThreads) override |
void | RunThreads (int a_nIter) override |
Executes the threads. More... | |
void | SetObserver (BSHP< Observer > a_prog) override |
std::vector< BSHP< ThreadLoop > > | Threads () override |
Gets the threads managed by this class. More... | |
void | SetupThreads () |
Sets up the threads. | |
void | MonitorThreads () |
Monitors the progress of all the threads. | |
void | FinishThreads () |
When all iterations are complete this terminates the threads. | |
Public Attributes | |
BSHP< ThreadLoop > | m_threader |
the worker class that is duplicated to run in multiple threads | |
BSHP< Observer > | m_prog |
observes the threads and gives feedback of % complete | |
int | m_nThread |
number of threads running | |
int | m_nIter |
total number of iterations for all threads combined | |
VecInt | m_beg |
starting index for each thread | |
VecInt | m_thrdNumIter |
number of iterations for each thread | |
VecInt | m_counts |
number of completed iterations for each thread | |
std::vector< myThread > | m_vMyThread |
vector of created threads | |
std::vector< boost::thread > | m_vThreads |
actual boost threads that are run | |
Additional Inherited Members | |
Static Public Member Functions inherited from xms::ThreadMgr | |
static BSHP< ThreadMgr > | New () |
Creates a ThreadMgr. More... | |
Protected Member Functions inherited from xms::ThreadMgr | |
ThreadMgr () | |
constructor | |
Implmentation of ThreadMgr.
Class to manage multiple threads using boost.
Definition at line 38 of file ThreadMgr.cpp.
|
inlineoverridevirtual |
a_nThreads | number of threads. |
Implements xms::ThreadMgr.
Definition at line 66 of file ThreadMgr.cpp.
References m_nThread.
|
overridevirtual |
Executes the threads.
[in] | a_nIter | Total number of iterations for the threads to execute. |
Implements xms::ThreadMgr.
Definition at line 139 of file ThreadMgr.cpp.
References FinishThreads(), m_nIter, m_nThread, MonitorThreads(), and SetupThreads().
a_prog | An observer |
Implements xms::ThreadMgr.
Definition at line 69 of file ThreadMgr.cpp.
References m_prog.
|
inlineoverridevirtual |
a_ | ThreadLoop. |
Implements xms::ThreadMgr.
Definition at line 64 of file ThreadMgr.cpp.
References m_threader.
|
overridevirtual |
Gets the threads managed by this class.
Implements xms::ThreadMgr.
Definition at line 126 of file ThreadMgr.cpp.
References m_vMyThread.