xmsinterp  1.0
xms::ThreadMgr Class Referenceabstract

Manages a multi-threaded process. More...

#include <ThreadMgr.h>

Inheritance diagram for xms::ThreadMgr:
xms::ThreadMgrImpl

Public Member Functions

virtual void SetThreadLoopClass (BSHP< ThreadLoop > a_)=0
 
virtual void ExplicitlySetNumThreads (int a_nThreads)=0
 
virtual void RunThreads (int a_nIter)=0
 
virtual void SetObserver (BSHP< Observer > a_prog)=0
 
virtual std::vector< BSHP< ThreadLoop > > Threads ()=0
 

Static Public Member Functions

static BSHP< ThreadMgrNew ()
 Creates a ThreadMgr. More...
 

Protected Member Functions

 ThreadMgr ()
 constructor
 

Private Member Functions

 XM_DISALLOW_COPY_AND_ASSIGN (ThreadMgr)
 prevent copy/assign compiler generated functions
 

Detailed Description

Manages a multi-threaded process.

See also
ThreadMgrImpl

Definition at line 27 of file ThreadMgr.h.

Member Function Documentation

◆ ExplicitlySetNumThreads()

virtual void xms::ThreadMgr::ExplicitlySetNumThreads ( int  a_nThreads)
pure virtual

Don't have to call this and will use all processors

Parameters
a_nThreadsNumber of threads.

Implemented in xms::ThreadMgrImpl.

◆ New()

BSHP< ThreadMgr > xms::ThreadMgr::New ( )
static

Creates a ThreadMgr.

Returns
shared pointer to ThreadMgr

Definition at line 105 of file ThreadMgr.cpp.

References xms::ThreadMgrImpl::ThreadMgrImpl().

Referenced by xms::NodalFuncImpl::ComputeNodalFuncs(), and xms::InterpIdwImpl::InterpToPts().

◆ RunThreads()

virtual void xms::ThreadMgr::RunThreads ( int  a_nIter)
pure virtual

Execute the code in multiple threads

Parameters
a_nIterTotal number of iterations for the threads to execute.

Implemented in xms::ThreadMgrImpl.

◆ SetObserver()

virtual void xms::ThreadMgr::SetObserver ( BSHP< Observer a_prog)
pure virtual

To provide gui feedback

Parameters
a_progObserver.

Implemented in xms::ThreadMgrImpl.

◆ SetThreadLoopClass()

virtual void xms::ThreadMgr::SetThreadLoopClass ( BSHP< ThreadLoop a_)
pure virtual

class that does the work

Parameters
a_ThreadLoop class.

Implemented in xms::ThreadMgrImpl.

◆ Threads()

virtual std::vector<BSHP<ThreadLoop> > xms::ThreadMgr::Threads ( )
pure virtual

Vector of threads managed by this class

Returns
Vector of threads managed by this class

Implemented in xms::ThreadMgrImpl.


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