9 std::numeric_limits<int>::max(),
10 std::numeric_limits<int>::max(),
21 std::numeric_limits<int>::max(),
31 std::numeric_limits<int>::max(),
32 std::numeric_limits<int>::max(),
41 [[maybe_unused]]
int numberOfTasksToFuse,
42 [[maybe_unused]]
bool fuseImmediately,
43 [[maybe_unused]]
bool processTasksWhileWaitingInBSPArea,
44 [[maybe_unused]]
int targetDevice
47 std::numeric_limits<int>::max(),
57 int numberOfTasksToHoldBack,
60 int deviceForFusedTasks,
61 bool fuseTasksImmediatelyWhenSpawned,
62 int maxNestedConcurrency
64 _numberOfTasksToHoldBack(numberOfTasksToHoldBack),
65 _minTasksToFuse(minTasksToFuse),
66 _maxTasksToFuse(maxTasksToFuse),
67 _deviceForFusedTasks(deviceForFusedTasks),
68 _fuseTasksImmediatelyWhenSpawned(fuseTasksImmediatelyWhenSpawned),
69 _maxNestedConcurrency(maxNestedConcurrency) {}
77 _deviceForFusedTasks, _minTasksToFuse, _maxTasksToFuse
82 [[maybe_unused]]
int nestedParallelismLevel,
83 [[maybe_unused]]
int numberOfTasks,
84 [[maybe_unused]]
int codeLocationIdentifier
86 if (nestedParallelismLevel > _maxNestedConcurrency) {
98 double averageNumberOfPendingReadyTasksPerProcessTaskExecution
static constexpr int Host
A hard coded strategy that can realise a few standard tasking patterns.
virtual void endBSPSection(int nestedParallelismLevel) override
Notifies the strategy that we leave a BSP (fork-join) section.
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.
virtual void updateFuseStatistics(int taskType, int queueSize, double averageNumberOfPendingReadyTasksPerProcessTaskExecution) override
virtual FuseInstruction fuse(int taskType) override
How many tasks shall system hold back from tasking runtime in user-defined queues.
virtual void startBSPSection(int nestedParallelismLevel) override
Notifies the strategy that we enter a BSP section.
virtual ExecutionPolicy paralleliseForkJoinSection(int nestedParallelismLevel, int numberOfTasks, int taskType) override
Determine how to handle/realise parallelisation within fork/join region.
static Hardcoded * createNative()
Fall back to native tasking.
static Hardcoded * createBSP()
If you want to use sole BSP, you effectively switch off the tasking.
Hardcoded(int numberOfTasksToHoldBack, int minTasksToFuse, int maxTasksToFuse, int deviceForFusedTasks, bool fuseTasksImmediatelyWhenSpawned, int maxNestedConcurrency)
Construct hardcoded scheme.
static Hardcoded * createBackfill()
Backfill strategy from the IWOMP paper.
ExecutionPolicy
Provide hint of execution policy.