TuttleOFX
1
|
Class that wraps up SMP multi-processing. More...
#include <ofxsMultiThread.h>
Public Member Functions | |
Processor () | |
ctor | |
virtual | ~Processor () |
dtor | |
virtual void | multiThreadFunction (const unsigned int threadID, const unsigned int nThreads)=0 |
function that will be called in each thread. ID is from 0..nThreads-1 nThreads are the number of threads it is being run over | |
virtual void | multiThread (const unsigned int nCPUs=0) |
call this to kick off multi threading | |
Static Private Member Functions | |
static void | staticMultiThreadFunction (unsigned int threadIndex, unsigned int threadMax, void *customArg) |
Function to pass to the multi thread suite. |
Class that wraps up SMP multi-processing.
Definition at line 56 of file ofxsMultiThread.h.
OFX::MultiThread::Processor::Processor | ( | void | ) |
ctor
Definition at line 49 of file ofxsMultiThread.cpp.
OFX::MultiThread::Processor::~Processor | ( | ) | [virtual] |
dtor
Definition at line 53 of file ofxsMultiThread.cpp.
void OFX::MultiThread::Processor::multiThread | ( | const unsigned int | nCPUs = 0 | ) | [virtual] |
call this to kick off multi threading
Function to pass to the multi thread suite.
The nCPUs is 0, the maximum allowable number of CPUs will be used.
Definition at line 67 of file ofxsMultiThread.cpp.
References OFX::MultiThread::getNumCPUs(), OFX::Private::gThreadSuite, OfxMultiThreadSuiteV1::multiThread, multiThreadFunction(), OFXS_COUT_ERROR, staticMultiThreadFunction(), and OFX::throwSuiteStatusException().
Referenced by tuttle::plugin::ImageProcessor::process().
virtual void OFX::MultiThread::Processor::multiThreadFunction | ( | const unsigned int | threadID, |
const unsigned int | nThreads | ||
) | [pure virtual] |
function that will be called in each thread. ID is from 0..nThreads-1 nThreads are the number of threads it is being run over
Implemented in tuttle::plugin::ImageProcessor.
Referenced by multiThread(), and staticMultiThreadFunction().
void OFX::MultiThread::Processor::staticMultiThreadFunction | ( | unsigned int | threadIndex, |
unsigned int | threadMax, | ||
void * | customArg | ||
) | [static, private] |
Function to pass to the multi thread suite.
Definition at line 57 of file ofxsMultiThread.cpp.
References multiThreadFunction().
Referenced by multiThread().