11 TunableSetting(VarType type, TunableParam param);
12 TunableSetting(VarType type1, VarType type2, TunableParam param);
13 TunableSetting(TunableParam param);
14 TunableSetting(TunableSetting *ts);
15 void setDecision(int _low, int _high, int _default, int _selection);
17 friend std ::ostream &operator<< (std::ostream &stream, const TunableSetting &matrix);
28 friend unsigned int tunableSettingHash(TunableSetting *setting);
29 friend bool tunableSettingEquals(TunableSetting *setting1, TunableSetting *setting2);
30 friend class SearchTuner;
31 friend class StaticSearchTuner;
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 {
43 SearchTuner(const char *filename);
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 void setTunable(TunableParam param, TunableDesc *descriptor, uint value);
49 void setVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor, uint value);
50 void setVarTunable(VarType vartype1, VarType vartype2, TunableParam param, TunableDesc *descriptor, uint value);
51 SearchTuner *copyUsed();
53 uint getSize() { return usedSettings.getSize();}
56 void serialize(const char *file);
57 void serializeUsed(const char *file);
58 void addUsed(const char *file);
62 /** Used Settings keeps track of settings that were actually used by
63 the example. Mutating settings may cause the Constraint Compiler
64 not to query other settings.*/
65 HashsetTunableSetting usedSettings;
66 /** Settings contains all settings. */
67 HashsetTunableSetting settings;