22 std::map<int, tarch::multicore::taskfusion::ReadyFusableTasks*> pendingTasksThatCanBeFused;
27 const std::string SubmitFusedTaskStatisticsIdentifier(
"tarch::multicore::taskfusion::submit-fused-tasks");
33 const std::set<TaskNumber>& inDependencies,
43 native::spawnTask(task, inDependencies, taskNumber);
48 if (pendingTasksThatCanBeFused.count(task->
getTaskType())==0) {
49 pendingTasksThatCanBeFused.insert(
50 std::pair<int, ReadyFusableTasks*>(
60 "translateFusableTaskIntoTaskSequence(...)",
61 "spawn two tasks around " << taskNumber <<
62 " (min-tasks=" << instruction.
minTasks <<
63 ", max-tasks=" << instruction.
maxTasks <<
67 std::set<TaskNumber> processReadTaskInDependencyNumber;
79 tarch::multicore::native::spawnTask( readyTask, inDependencies, taskNumber);
80 processReadTaskInDependencyNumber.insert( taskNumber );
85 tarch::multicore::native::spawnTask( processTask, processReadTaskInDependencyNumber, taskNumber);
92 for (
auto& p: pendingTasksThatCanBeFused) {
93 const int AnyTask = -1;
94 ProcessReadyTask::tryToProcessOneTask(p.second, AnyTask);
#define assertion1(expr, param)
#define logDebug(methodName, logMacroMessageStream)
void inc(const std::string &identifier, double value=1.0, bool disableSampling=false, bool clearAfterDatabaseDump=false)
static Statistics & getInstance()
This is not the canonical realisation of singletons as I use it usually for stats in Peano.
Create a lock around a boolean semaphore region.
void free()
Free the lock.
Abstract super class for a job.
void setPriority(int priority)
Set priority.
virtual FuseInstruction fuse(int taskType)=0
How many tasks shall system hold back from tasking runtime in user-defined queues.
Task plugging into state transition once task becomes ready.
static void insertReadyTask(Task *task, int taskNumber, ReadyFusableTasks *taskQueue)
Insert a new ready task into the local queues.
tarch::logging::Log _log("exahype2::fv")
void processAllReadyTasks()
void translateFusableTaskIntoTaskSequence(Task *task, const std::set< TaskNumber > &inDependencies, const TaskNumber &taskNumber)
Translate a single task into a sequence of (fusable tasks)
tarch::multicore::orchestration::Strategy & getOrchestration()
constexpr TaskNumber NoOutDependencies
Task queue of tasks which we hold back.