Adding a directed search based config for the tuner
[satune.git] / src / Tuner / searchtuner.h
index 20edb7d8537e0a27fc10bb9ae979785ec9fa9a64..612f60e174f826b239911d817428d458fb92a223 100644 (file)
@@ -3,18 +3,24 @@
 #include "classlist.h"
 #include "tunable.h"
 #include "structs.h"
+#include <ostream>
+using namespace std;
+#define TUNEFILE "tune.conf"
 
 class TunableSetting {
 public:
        TunableSetting(VarType type, TunableParam param);
+       TunableSetting(VarType type1, VarType type2, TunableParam param);
        TunableSetting(TunableParam param);
        TunableSetting(TunableSetting *ts);
        void setDecision(int _low, int _high, int _default, int _selection);
        void print();
+       friend std ::ostream &operator<< (std::ostream &stream, const TunableSetting &matrix);
        CMEMALLOC;
 private:
        bool hasVar;
-       VarType type;
+       VarType type1;
+       VarType type2;
        TunableParam param;
        int lowValue;
        int highValue;
@@ -37,11 +43,13 @@ public:
        ~SearchTuner();
        int getTunable(TunableParam param, TunableDesc *descriptor);
        int getVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor);
+       int getVarTunable(VarType vartype1, VarType vartype2, TunableParam param, TunableDesc *descriptor);
        SearchTuner *copyUsed();
        void randomMutate();
        uint getSize() { return usedSettings.getSize();}
        void print();
        void printUsed();
+       void serialize();
 
        CMEMALLOC;
 private:
@@ -51,5 +59,13 @@ private:
        HashsetTunableSetting usedSettings;
        /** Settings contains all settings. */
        HashsetTunableSetting settings;
+#ifdef STATICENCGEN
+        bool graphEncoding;
+        ElementEncodingType naiveEncoding;
+public:
+        int nextStaticTuner();
+#endif
 };
+
+
 #endif