8 #define TUNEFILE "tune.conf"
10 class TunableSetting {
12 TunableSetting(VarType type, TunableParam param);
13 TunableSetting(VarType type1, VarType type2, TunableParam param);
14 TunableSetting(TunableParam param);
15 TunableSetting(TunableSetting *ts);
16 void setDecision(int _low, int _high, int _default, int _selection);
18 friend std ::ostream &operator<< (std::ostream &stream, const TunableSetting &matrix);
29 friend unsigned int tunableSettingHash(TunableSetting *setting);
30 friend bool tunableSettingEquals(TunableSetting *setting1, TunableSetting *setting2);
31 friend class SearchTuner;
32 friend class StaticSearchTuner;
35 unsigned int tunableSettingHash(TunableSetting *setting);
36 bool tunableSettingEquals(TunableSetting *setting1, TunableSetting *setting2);
38 typedef Hashset<TunableSetting *, uintptr_t, 4, tunableSettingHash, tunableSettingEquals> HashsetTunableSetting;
39 typedef SetIterator<TunableSetting *, uintptr_t, 4, tunableSettingHash, tunableSettingEquals> SetIteratorTunableSetting;
41 class SearchTuner : public Tuner {
45 int getTunable(TunableParam param, TunableDesc *descriptor);
46 int getVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor);
47 int getVarTunable(VarType vartype1, VarType vartype2, TunableParam param, TunableDesc *descriptor);
48 SearchTuner *copyUsed();
50 uint getSize() { return usedSettings.getSize();}
57 /** Used Settings keeps track of settings that were actually used by
58 the example. Mutating settings may cause the Constraint Compiler
59 not to query other settings.*/
60 HashsetTunableSetting usedSettings;
61 /** Settings contains all settings. */
62 HashsetTunableSetting settings;