![]() |
Peano
|
Process ready task. More...
#include <ProcessReadyTask.h>
Public Member Functions | |
ProcessReadyTask (ReadyFusableTasks *taskQueue) | |
virtual bool | run () override |
Run the 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 bool | fuse (const std::list< Task * > &otherTasks, int targetDevice=Host) |
Fuse multiple tasks. | |
virtual std::string | toString () const |
Private Attributes | |
ReadyFusableTasks * | _taskQueue |
Static Private Attributes | |
static const std::string | ProcessFusedTasksStatisticsIdentifier = "tarch::multicore::taskfusion::process-fused-tasks" |
static tarch::logging::Log | _log |
Additional Inherited Members | |
![]() | |
static constexpr int | DefaultPriority = 1024 |
static constexpr int | Host = -1 |
static constexpr int | DontFuse = -1 |
![]() | |
const int | _taskType |
int | _priority |
Process ready task.
Each ready task is paired up with an instance of LogReadyTask which runs before. That is, we know that an instance of LogReadyTask has put the task of interest into the ready queue identified by _taskQueue. We therefore can now lock this queue and process all tasks from the queue in one rush. The task for which we have originally been created for through tarch::multicore::taskfusion::translateFusableTaskIntoTaskSequence() must be among the tasks in the queue, unless some other instance of ProcessReadyTask has already handled it. If this is the case, we are fine. Let's do all the other tasks that are in there and we are done.
Definition at line 35 of file ProcessReadyTask.h.
tarch::multicore::taskfusion::ProcessReadyTask::ProcessReadyTask | ( | ReadyFusableTasks * | taskQueue | ) |
Definition at line 12 of file ProcessReadyTask.cpp.
|
overridevirtual |
Run the task.
Implements tarch::multicore::Task.
Definition at line 18 of file ProcessReadyTask.cpp.
References tarch::multicore::orchestration::Strategy::FuseInstruction::device, tarch::multicore::Lock::free(), tarch::multicore::orchestration::Strategy::fuse(), tarch::logging::Statistics::getInstance(), tarch::multicore::Core::getInstance(), tarch::multicore::getOrchestration(), tarch::multicore::Lock::lock(), tarch::logging::Statistics::log(), logDebug, tarch::multicore::orchestration::Strategy::FuseInstruction::maxTasks, tarch::multicore::orchestration::Strategy::FuseInstruction::minTasks, tarch::multicore::native::processFusedTask(), tarch::multicore::Task::run(), and tarch::multicore::Core::yield().
|
staticprivate |
Definition at line 41 of file ProcessReadyTask.h.
|
private |
Definition at line 37 of file ProcessReadyTask.h.
|
staticprivate |
Definition at line 39 of file ProcessReadyTask.h.