|
Peano
|
Wrapper task around fusable tasks that is not ready yet. More...
#include <LogReadyTask.h>


Public Member Functions | |
| LogReadyTask (Task *task, int taskNumber, FusableTasksQueue &taskQueue) | |
| Construct log read task. | |
| virtual void | run () override |
| Run task. | |
Public Member Functions inherited from tarch::multicore::Task | |
| Task (int taskType, int priority) | |
| Construct task. | |
| virtual | ~Task () |
| int | getTaskType () const |
| int | getPriority () const |
| void | setPriority (int priority) |
| Set priority. | |
| virtual bool | canFuse () const |
| virtual void | fuse (const std::vector< Task * > &otherTasks, int targetDevice=Host) |
| Fuse multiple tasks. | |
| virtual std::string | toString () const |
Private Attributes | |
| Task * | _task |
| const int | _taskNumber |
| FusableTasksQueue & | _taskQueue |
Static Private Attributes | |
| static const std::string | SubmitFusedTasksStatisticsIdentifier |
| static tarch::logging::Log | _log |
Additional Inherited Members | |
Static Public Attributes inherited from tarch::multicore::Task | |
| static constexpr int | DefaultPriority = 1024 |
| static constexpr int | Host = -1 |
| static constexpr int | DontFuse = -1 |
Protected Attributes inherited from tarch::multicore::Task | |
| const int | _taskType |
| int | _priority |
Wrapper task around fusable tasks that is not ready yet.
This task takes a fusable task and "inherits" its in-dependencies. Once it becomes ready ready, it takes its fusable task and inserts this one into the ready queue. The task therefore is a mere wrapper: It ensure that a fusable task is not inserted into the ready queue before it really becomes ready. Other than that, it does not do anything.
If the fusion is implemented lazily, the spawning of a new fusable task with in-dependencies should lead to the creation of this task. The fusable routine then has to wait before the lazy evaluation is due, so we know that the right tasks are inserted.
This task is always paired up with an instance of ProcessReadyTask. This task takes the task _task and puts it into the _taskQueue. After that, it quits, i.e. logically hands over the responsibility to ProcessReadyTask.
Definition at line 45 of file LogReadyTask.h.
| tarch::multicore::taskfusion::LogReadyTask::LogReadyTask | ( | Task * | task, |
| int | taskNumber, | ||
| FusableTasksQueue & | taskQueue ) |
Construct log read task.
| task | Task that is to be inserted into fusable queue as soon as this task starts to run |
| taskNumber | out dependency (no) of outgoing task |
| taskQueue | Reference to task queue |
|
overridevirtual |
Run task.
If this routine is invoked, we know that all the incoming dependencies of _task are now complete. We refrain from running the task now (even though it would be valid). Instead, we lock our queue and add the task. handleFusableTask() should already have issued a follow-up task of type ProcessReadyTask. Therefore, this is all to be done here. No more work.
Implements tarch::multicore::Task.
|
staticprivate |
Definition at line 53 of file LogReadyTask.h.
|
private |
Definition at line 47 of file LogReadyTask.h.
|
private |
Definition at line 48 of file LogReadyTask.h.
|
private |
Definition at line 49 of file LogReadyTask.h.
|
staticprivate |
Definition at line 51 of file LogReadyTask.h.