Merge branch 'master' of ssh://demsky.eecs.uci.edu/home/git/constraint_compiler into...
[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         Tuner();
9         int getTunable(TunableParam param, TunableDesc *descriptor);
10         int getVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor);
11         MEMALLOC;
12 };
13
14 class TunableDesc {
15 public:
16         TunableDesc(int _lowValue, int _highValue, int _defaultValue) : lowValue(_lowValue), highValue(_highValue), defaultValue(_defaultValue) {}
17         int lowValue;
18         int highValue;
19         int defaultValue;
20         MEMALLOC;
21 };
22
23
24 #define GETTUNABLE(This, param, descriptor) This->getTunable(param, descriptor)
25 #define GETVARTUNABLE(This, vartype, param, descriptor) This->getTunable(param, descriptor)
26
27 static TunableDesc onoff(0, 1, 1);
28 static TunableDesc offon(0, 1, 0);
29
30 enum Tunables {DECOMPOSEORDER, MUSTREACHGLOBAL, MUSTREACHLOCAL, MUSTREACHPRUNE, OPTIMIZEORDERSTRUCTURE, ORDERINTEGERENCODING};
31 typedef enum Tunables Tunables;
32 #endif