Peano
Loading...
Searching...
No Matches
Hardcoded.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5#include "Strategy.h"
6
7namespace tarch {
8 namespace multicore {
9 namespace orchestration {
10 class Hardcoded;
11 } // namespace orchestration
12 } // namespace multicore
13} // namespace tarch
14
22private:
29
30public:
38 static Hardcoded* createBSP();
39
46 static Hardcoded* createNative();
47
51 static Hardcoded* createBackfill();
52
67 int numberOfTasksToFuse, bool fuseImmediately, bool processTasksWhileWaitingInBSPArea, int targetDevice
68 );
69
76 int numberOfTasksToHoldBack,
77 int minTasksToFuse,
78 int maxTasksToFuse,
79 int deviceForFusedTasks,
80 bool fuseTasksImmediatelyWhenSpawned,
81 int maxNestedConcurrency
82 );
83 virtual ~Hardcoded() = default;
84
85 virtual void startBSPSection(int nestedParallelismLevel) override;
86 virtual void endBSPSection(int nestedParallelismLevel) override;
87 virtual FuseInstruction fuse(int taskType) override;
88 virtual ExecutionPolicy paralleliseForkJoinSection(int nestedParallelismLevel, int numberOfTasks, int taskType)
89 override;
90
91 virtual void updateFuseStatistics(
92 int taskType,
93 int queueSize,
94 double averageNumberOfPendingReadyTasksPerProcessTaskExecution
95 ) override;
96};
A hard coded strategy that can realise a few standard tasking patterns.
Definition Hardcoded.h:21
virtual void endBSPSection(int nestedParallelismLevel) override
Notifies the strategy that we leave a BSP (fork-join) section.
Definition Hardcoded.cpp:73
static Hardcoded * createFuseAll(int numberOfTasksToFuse, bool fuseImmediately, bool processTasksWhileWaitingInBSPArea, int targetDevice)
Create a strategy where tasks are always fused if possible given the configuration constraints.
Definition Hardcoded.cpp:40
virtual void updateFuseStatistics(int taskType, int queueSize, double averageNumberOfPendingReadyTasksPerProcessTaskExecution) override
Definition Hardcoded.cpp:95
virtual FuseInstruction fuse(int taskType) override
How many tasks shall system hold back from tasking runtime in user-defined queues.
Definition Hardcoded.cpp:75
virtual void startBSPSection(int nestedParallelismLevel) override
Notifies the strategy that we enter a BSP section.
Definition Hardcoded.cpp:71
virtual ExecutionPolicy paralleliseForkJoinSection(int nestedParallelismLevel, int numberOfTasks, int taskType) override
Determine how to handle/realise parallelisation within fork/join region.
Definition Hardcoded.cpp:81
static Hardcoded * createNative()
Fall back to native tasking.
Definition Hardcoded.cpp:18
static Hardcoded * createBSP()
If you want to use sole BSP, you effectively switch off the tasking.
Definition Hardcoded.cpp:7
Hardcoded(int numberOfTasksToHoldBack, int minTasksToFuse, int maxTasksToFuse, int deviceForFusedTasks, bool fuseTasksImmediatelyWhenSpawned, int maxNestedConcurrency)
Construct hardcoded scheme.
Definition Hardcoded.cpp:56
static Hardcoded * createBackfill()
Backfill strategy from the IWOMP paper.
Definition Hardcoded.cpp:29
Interface for any task orchestration.
Definition Strategy.h:29
ExecutionPolicy
Provide hint of execution policy.
Definition Strategy.h:41
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19