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;
34 unsigned int tunableSettingHash(TunableSetting *setting);
35 bool tunableSettingEquals(TunableSetting *setting1, TunableSetting *setting2);
37 typedef Hashset<TunableSetting *, uintptr_t, 4, tunableSettingHash, tunableSettingEquals> HashsetTunableSetting;
38 typedef SetIterator<TunableSetting *, uintptr_t, 4, tunableSettingHash, tunableSettingEquals> SetIteratorTunableSetting;
40 class SearchTuner : public Tuner {
44 int getTunable(TunableParam param, TunableDesc *descriptor);
45 int getVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor);
46 int getVarTunable(VarType vartype1, VarType vartype2, TunableParam param, TunableDesc *descriptor);
47 SearchTuner *copyUsed();
49 uint getSize() { return usedSettings.getSize();}
56 /** Used Settings keeps track of settings that were actually used by
57 the example. Mutating settings may cause the Constraint Compiler
58 not to query other settings.*/
59 HashsetTunableSetting usedSettings;
60 /** Settings contains all settings. */
61 HashsetTunableSetting settings;