![]() |
XII Release 0.1.0
|
Copyright (c) Theophilus Eriata. All Rights Reserved. More...
#include <ParallelFor_inl.h>
Public Member Functions | |
| ArrayPtrTask (xiiArrayPtr< ElemType > payload, xiiParallelForFunction< ElemType > taskCallback, xiiUInt32 uiItemsPerInvocation) | |
| void | Execute () override |
| void | ExecuteWithMultiplicity (xiiUInt32 uiInvocation) const override |
| Public Member Functions inherited from xiiTask | |
| xiiTask () | |
| Copyright (c) Theophilus Eriata. All Rights Reserved. | |
| void | ConfigureTask (xiiStringView sTaskName, xiiTaskNesting nestingMode, xiiOnTaskFinishedCallback callback=xiiOnTaskFinishedCallback()) |
| void | SetMultiplicity (xiiUInt32 uiMultiplicity) |
| xiiUInt32 | GetMultiplicity () const |
| bool | IsTaskFinished () const |
| bool | HasBeenCanceled () const |
| Can be used inside an overridden 'Execute' function to terminate execution prematurely. | |
| Public Member Functions inherited from xiiRefCounted | |
| virtual | ~xiiRefCounted ()=default |
| Adds a virtual destructor. | |
| Public Member Functions inherited from xiiRefCountingImpl | |
| xiiRefCountingImpl ()=default | |
| Constructor. | |
| xiiRefCountingImpl (const xiiRefCountingImpl &rhs) | |
| void | operator= (const xiiRefCountingImpl &rhs) |
| xiiUInt32 | AddRef () const |
| Increments the reference counter. Returns the new reference count. | |
| bool | TryAddRef () const |
| xiiUInt32 | ReleaseRef () const |
| Decrements the reference counter. Returns the new reference count.ywat. | |
| bool | IsReferenced () const |
| Returns true if the reference count is greater than 0, false otherwise. | |
| xiiUInt32 | GetRefCount () const |
| Returns the current reference count. | |
Copyright (c) Theophilus Eriata. All Rights Reserved.
|
inlineoverridevirtual |
Override this to implement the task's supposed functionality.
This function is called for tasks that do not use multiplicity. They are executed a single time for each time they are added to the xiiTaskSystem.
Reimplemented from xiiTask.
|
inlineoverridevirtual |
Override this to implement the task's supposed functionality.
This function is called for tasks that use multiplicity. A task that uses multiplicity is automatically run N times by the xiiTaskSystem, each time with an increasing invocation index. This allows to have a single task to handle something, but then decide dynamically how often to execute it, to subdivide the workload into multiple pieces. Since the same task is executed multiple times in parallel, tasks with multiplicity should not have any mutable state, which is why this function is const.
Reimplemented from xiiTask.