Report from analyzing the tuner
[satune.git] / src / Tuner / searchtuner.h
index 2cd3118bda41514bf9939d94a86fbd85f8175c38..76244257e08a5ba56de938a0cb4458b7ffb8e488 100644 (file)
@@ -28,27 +28,22 @@ private:
        friend unsigned int tunableSettingHash(TunableSetting *setting);
        friend bool tunableSettingEquals(TunableSetting *setting1, TunableSetting *setting2);
        friend class SearchTuner;
-       friend class StaticSearchTuner;
+       friend class SerializeTuner;
 };
 
-unsigned int tunableSettingHash(TunableSetting *setting);
-bool tunableSettingEquals(TunableSetting *setting1, TunableSetting *setting2);
-
-typedef Hashset<TunableSetting *, uintptr_t, 4, tunableSettingHash, tunableSettingEquals> HashsetTunableSetting;
-typedef SetIterator<TunableSetting *, uintptr_t, 4, tunableSettingHash, tunableSettingEquals> SetIteratorTunableSetting;
-
 class SearchTuner : public Tuner {
 public:
        SearchTuner();
        SearchTuner(const char *filename);
        ~SearchTuner();
-       int getTunable(TunableParam param, TunableDesc *descriptor);
+       virtual int getTunable(TunableParam param, TunableDesc *descriptor);
        int getVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor);
-       int getVarTunable(VarType vartype1, VarType vartype2, TunableParam param, TunableDesc *descriptor);
+       virtual int getVarTunable(VarType vartype1, VarType vartype2, TunableParam param, TunableDesc *descriptor);
        void setTunable(TunableParam param, TunableDesc *descriptor, uint value);
        void setVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor, uint value);
        void setVarTunable(VarType vartype1, VarType vartype2, TunableParam param, TunableDesc *descriptor, uint value);
        SearchTuner *copyUsed();
+        bool isSubTunerof(SearchTuner *newTuner);
        void randomMutate();
        uint getSize() { return usedSettings.getSize();}
        void print();
@@ -56,7 +51,7 @@ public:
        void serialize(const char *file);
        void serializeUsed(const char *file);
        void addUsed(const char *file);
-
+        bool equalUsed(SearchTuner *tuner);
        CMEMALLOC;
 protected:
        /** Used Settings keeps track of settings that were actually used by