X-Git-Url: http://plrg.eecs.uci.edu/git/?p=satune.git;a=blobdiff_plain;f=src%2FTuner%2Ftunable.h;h=6077891a5cff896daa2c990796dd3a74e58da7a6;hp=6f091abdeb5974e875951241650eb2281453a531;hb=7ab5516d0205e463969af92c1b200a316d4a08f0;hpb=d459d8a6265e8ef502b8105856c819f1ed44f23d diff --git a/src/Tuner/tunable.h b/src/Tuner/tunable.h index 6f091ab..6077891 100644 --- a/src/Tuner/tunable.h +++ b/src/Tuner/tunable.h @@ -3,22 +3,30 @@ #include "classlist.h" -struct Tuner { +class Tuner { +public: + Tuner(); + int getTunable(TunableParam param, TunableDesc *descriptor); + int getVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor); + MEMALLOC; }; -struct TunableDesc { +class TunableDesc { +public: + TunableDesc(int _lowValue, int _highValue, int _defaultValue) : lowValue(_lowValue), highValue(_highValue), defaultValue(_defaultValue) {} int lowValue; int highValue; int defaultValue; + MEMALLOC; }; -Tuner * allocTuner(); -void deleteTuner(Tuner *This); -int getTunable(Tuner This, TunableParam param, TunableDesc * descriptor); -int getVarTunable(Tuner This, VarType vartype, TunableParam param, TunableDesc * descriptor); +#define GETTUNABLE(This, param, descriptor) This->getTunable(param, descriptor) +#define GETVARTUNABLE(This, vartype, param, descriptor) This->getTunable(param, descriptor) -#define GETTUNABLE(This, param, descriptor) getTunable(This, param, descriptor); -#define GETVARTUNABLE(This, vartype, param, descriptor) getTunable(This, param, descriptor); +static TunableDesc onoff(0, 1, 1); +static TunableDesc offon(0, 1, 0); +enum Tunables {DECOMPOSEORDER, MUSTREACHGLOBAL, MUSTREACHLOCAL, MUSTREACHPRUNE, OPTIMIZEORDERSTRUCTURE, ORDERINTEGERENCODING}; +typedef enum Tunables Tunables; #endif