Peano
Loading...
Searching...
No Matches
SamplingMulticoreOrchestration.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 <map>
6
7#include "Strategy.h"
10
11namespace tarch {
12 namespace multicore {
13 namespace orchestration {
14 class GeneticOptimisation;
15 } // namespace orchestration
16 } // namespace multicore
17} // namespace tarch
18
26public:
27 struct Key {
32
33 Key(
34 int numberOfTasksToHoldBack_,
35 FuseInstruction fusionInstruction_,
36 bool fuseTasksImmediatelyWhenSpawned_,
37 bool processPendingTasksWhileWaiting_
38 );
39
40 bool operator<(const Key& other) const;
41
42 std::string toString() const;
43 };
44
45private:
47
48 struct Value {
51
52 Value(double probability_);
53 };
54
55 std::map<Key, Value> _configurationVariants;
56
62
64 void normalise();
68
69public:
71 virtual ~GeneticOptimisation() = default;
72
73 virtual void startBSPSection() override;
74 virtual void endBSPSection() override;
75 virtual int getNumberOfTasksToHoldBack() override;
77 virtual bool fuseTasksImmediatelyWhenSpawned() override;
78 virtual ExecutionPolicy paralleliseForkJoinSection(int nestedParallelismLevel, int numberOfTasks, int taskType)
79 override;
80};
Log Device.
Definition Log.h:516
A hard coded strategy that can realise a few standard tasking patterns.
virtual ExecutionPolicy paralleliseForkJoinSection(int nestedParallelismLevel, int numberOfTasks, int taskType) override
Determine how to handle/realise parallelisation within fork/join region.
Interface for any task orchestration.
Definition Strategy.h:29
ExecutionPolicy
Provide hint of execution policy.
Definition Strategy.h:41
A simple class that has to be included to measure the clock ticks required for an operation.
Definition Watch.h:45
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19
Key(int numberOfTasksToHoldBack_, FuseInstruction fusionInstruction_, bool fuseTasksImmediatelyWhenSpawned_, bool processPendingTasksWhileWaiting_)