GPU-Accelerated Coverage
0.1.0
Compute coverage tours for known environment with articulated objects on GPU
|
Abstract superclass for parallel tasks. More...
#include <AbstractTask.h>
Public Member Functions | |
AbstractTask (SharedData *const sharedData, const size_t threadNr) | |
Constructor. More... | |
virtual | ~AbstractTask () |
Destructor. | |
virtual void | run ()=0 |
Method doing the main work of the task. | |
virtual void | finish () |
Method called after all parallel tasks have finished their run() method. | |
bool | isReady () const |
void | setSeed (unsigned int seed) |
Protected Attributes | |
const size_t | threadNr |
Thread number. | |
bool | ready |
Set to true when renderer is ready, see isReady(). | |
SharedData *const | sharedData |
Task synchronization objects. | |
unsigned int | seed |
Random seed. | |
Abstract superclass for parallel tasks.
This class is the abstract superclass for tasks can can be executed in parallel.
Subclasses must implement at least the following methods:
gpu_coverage::AbstractTask::AbstractTask | ( | SharedData *const | sharedData, |
const size_t | threadNr | ||
) |
Constructor.
[in] | sharedData | Task synchronization objects shared between all tasks. |
[in] | threadNr | The number of the thread executing the task. |
Subclasses should set ready = true when the task is initialized and ready to be executed.
|
inline |
Returns true if the task is ready to be executed.
|
inline |
Set random seed for reproducible results.
[in] | seed | Random seed. |
By default, a seed based on time and thread number is used.