edits
[satune.git] / src / Tuner / tunable.h
1 #ifndef TUNABLE_H
2 #define TUNABLE_H
3 #include "classlist.h"
4
5
6 class Tuner {
7 public:
8         virtual int getTunable(TunableParam param, TunableDesc *descriptor);
9         virtual int getVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor);
10         virtual ~Tuner();
11         MEMALLOC;
12 };
13
14 class DefaultTuner : public Tuner {
15 public:
16         DefaultTuner();
17         int getTunable(TunableParam param, TunableDesc *descriptor);
18         int getVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor);
19         MEMALLOC;
20 };
21
22
23
24 class TunableDesc {
25 public:
26         TunableDesc(int _lowValue, int _highValue, int _defaultValue) : lowValue(_lowValue), highValue(_highValue), defaultValue(_defaultValue) {}
27         int lowValue;
28         int highValue;
29         int defaultValue;
30         MEMALLOC;
31 };
32
33
34 #define GETTUNABLE(This, param, descriptor) This->getTunable(param, descriptor)
35 #define GETVARTUNABLE(This, vartype, param, descriptor) This->getTunable(param, descriptor)
36
37 static TunableDesc onoff(0, 1, 1);
38 static TunableDesc offon(0, 1, 0);
39
40 enum Tunables {DECOMPOSEORDER, MUSTREACHGLOBAL, MUSTREACHLOCAL, MUSTREACHPRUNE, OPTIMIZEORDERSTRUCTURE, ORDERINTEGERENCODING};
41 typedef enum Tunables Tunables;
42 #endif