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
15
26 private:
32
33 public:
42
50
65 int numberOfTasksToFuse, int targetDevice
66 );
67
68 static constexpr int NoNestedParallelism = 1;
69
82 int minTasksToFuse,
83 int maxTasksToFuse,
84 int deviceForFusedTasks,
85 int maxNestedConcurrency,
86 FusionImplementation fusionImplementation
87 );
88 virtual ~Hardcoded() = default;
89
90 virtual void startBSPSection(int nestedParallelismLevel) override;
91 virtual void endBSPSection(int nestedParallelismLevel) override;
92 virtual FuseInstruction fuse(int taskType) override;
93 virtual ExecutionPolicy paralleliseForkJoinSection(int nestedParallelismLevel, int numberOfTasks, int taskType)
94 override;
95
97 int taskType,
98 int queueSize,
99 double averageNumberOfPendingReadyTasksPerProcessTaskExecution,
100 double probabilityThatTaskIsCompleted
101 ) override;
102
104};
A hard coded strategy how to handle tasks and task fusion.
Definition Hardcoded.h:25
FusionImplementation _fusionImplementation
Definition Hardcoded.h:31
virtual void startBSPSection(int nestedParallelismLevel) override
Notifies the strategy that we enter a BSP section.
Hardcoded(int minTasksToFuse, int maxTasksToFuse, int deviceForFusedTasks, int maxNestedConcurrency, FusionImplementation fusionImplementation)
Construct hardcoded scheme.
static Hardcoded * createNative()
Fall back to native tasking.
virtual void updateFuseStatistics(int taskType, int queueSize, double averageNumberOfPendingReadyTasksPerProcessTaskExecution, double probabilityThatTaskIsCompleted) override
Update task fusion status.
virtual FuseInstruction fuse(int taskType) override
How many tasks to fuse and to which device to deploy.
static Hardcoded * createBSP()
If you want to use sole BSP, you effectively switch off the tasking.
virtual void endBSPSection(int nestedParallelismLevel) override
Notifies the strategy that we leave a BSP (fork-join) section.
static Hardcoded * createFuseAll(int numberOfTasksToFuse, int targetDevice)
Always fuse all tasks possible.
virtual ExecutionPolicy paralleliseForkJoinSection(int nestedParallelismLevel, int numberOfTasks, int taskType) override
Determine how to handle/realise parallelisation within fork/join region.
virtual FusionImplementation getFusionImplementation() const override
Determine how the implementation handles fusable tasks.
Interface for any task orchestration.
Definition Strategy.h:288
ExecutionPolicy
Provide hint of execution policy.
Definition Strategy.h:300
FusionImplementation
Control how the fusion is implemented.
Definition Strategy.h:91
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19