OpenWalnut
1.5.0dev
|
Nearly the same class as WThreadedJobs, but this class is intended to be used for multithreaded operations on voxels and therefore it uses Striping to partition the data. More...
#include <WThreadedJobs.h>
Public Types | |
typedef Input_T | InputType |
the input type More... | |
typedef Job_T | JobType |
the job type More... | |
Public Member Functions | |
WThreadedStripingJobs (std::shared_ptr< InputType const > input) | |
Constructor. More... | |
virtual | ~WThreadedStripingJobs () |
Destructor. More... | |
void | operator() (std::size_t id, std::size_t numThreads, WBoolFlag const &shutdown) |
The threaded function operation. More... | |
virtual void | compute (std::shared_ptr< InputType const > input, std::size_t voxelNum)=0 |
Abstract function that performs the actual computation per voxel. More... | |
Protected Attributes | |
std::shared_ptr< InputType const > | m_input |
the input More... | |
Nearly the same class as WThreadedJobs, but this class is intended to be used for multithreaded operations on voxels and therefore it uses Striping to partition the data.
This is necessarry since if the threads are not operating on blocks, they slow down!
Definition at line 133 of file WThreadedJobs.h.
typedef Input_T WThreadedStripingJobs< Input_T, Job_T >::InputType |
the input type
Definition at line 137 of file WThreadedJobs.h.
typedef Job_T WThreadedStripingJobs< Input_T, Job_T >::JobType |
the job type
Definition at line 140 of file WThreadedJobs.h.
WThreadedStripingJobs< Input_T, Job_T >::WThreadedStripingJobs | ( | std::shared_ptr< InputType const > | input | ) |
Constructor.
input | The input. |
Definition at line 179 of file WThreadedJobs.h.
References WThreadedStripingJobs< Input_T, Job_T >::m_input.
|
virtual |
Destructor.
Definition at line 189 of file WThreadedJobs.h.
|
pure virtual |
Abstract function that performs the actual computation per voxel.
input | The input data. |
voxelNum | The voxel number to operate on. |
Implemented in WThreadedPerVoxelOperation< Value_T, numValues, Output_T, numOutputs >.
void WThreadedStripingJobs< Input_T, Job_T >::operator() | ( | std::size_t | id, |
std::size_t | numThreads, | ||
WBoolFlag const & | shutdown | ||
) |
The threaded function operation.
Pulls jobs and executes the
id | The thread's ID. |
numThreads | How many threads are working on the jobs. |
shutdown | A shared flag indicating the thread should be stopped. |
Definition at line 194 of file WThreadedJobs.h.
|
protected |
the input
Definition at line 174 of file WThreadedJobs.h.
Referenced by WThreadedStripingJobs< Input_T, Job_T >::WThreadedStripingJobs().