|
HDK
|
Instances of this class are used to synchronize dynamic, acyclic task graphs, allowing tasks to claim dependents for processing. Methods on this class are thread-safe unless specifically called out to not be thread-safe. More...
#include <parallelTaskSync.h>
Public Types | |
| enum | State { State::Done, State::Wait, State::Claimed } |
Public Member Functions | |
| VdfParallelTaskSync (const VdfParallelTaskSync &)=delete | |
| VdfParallelTaskSync & | operator= (const VdfParallelTaskSync &)=delete |
| VdfParallelTaskSync (WorkTaskGraph *taskGraph) | |
| VDF_API void | Reset (const size_t num) |
| State | Claim (const size_t idx, WorkTaskGraph::BaseTask *successor) |
| void | MarkDone (const size_t idx) |
Instances of this class are used to synchronize dynamic, acyclic task graphs, allowing tasks to claim dependents for processing. Methods on this class are thread-safe unless specifically called out to not be thread-safe.
Definition at line 34 of file parallelTaskSync.h.
|
strong |
The different states a task can be in.
Definition at line 61 of file parallelTaskSync.h.
|
delete |
Noncopyable.
|
inline |
Constructor.
Definition at line 44 of file parallelTaskSync.h.
|
inline |
Claims the task idx for processing, and returns the new task state.
This method will automatically increment the reference count of the successor, if the task has already been claimed, and will cause the reference count of successor to be automatically decremented as soon as the task completes.
Definition at line 116 of file parallelTaskSync.h.
|
inline |
Mark the task idx as done.
This method will notify any tasks depending on idx about the completion of idx.
Definition at line 141 of file parallelTaskSync.h.
|
delete |
Resets the state of all tasks in the graph. Ensures that num entries are available for use.
It is not thread-safe to call this method on the same instance from multiple threads.