Bug fix ...
authorHamed Gorjiara <hgorjiar@uci.edu>
Fri, 7 Dec 2018 23:33:10 +0000 (15:33 -0800)
committerHamed Gorjiara <hgorjiar@uci.edu>
Fri, 7 Dec 2018 23:33:10 +0000 (15:33 -0800)
src/Test/runcomptuner.cc
src/Tuner/searchtuner.cc
src/Tuner/searchtuner.h

index dc3c035..f625e62 100644 (file)
@@ -23,7 +23,7 @@ int main(int argc, char **argv) {
                        else
                                multituner->addProblem(argv[i]);
                } else
-                       multituner->addTuner(new SearchTuner(argv[i]));
+                       multituner->addTuner(new SearchTuner(argv[i], true )); //add settings to usedsettigs
        }
 
        if (!tunerfiles) {
index 373fc4c..a600580 100644 (file)
@@ -64,7 +64,7 @@ ostream &operator<<(ostream &os, const TunableSetting &ts)
 SearchTuner::SearchTuner() {
 }
 
-SearchTuner::SearchTuner(const char *filename) {
+SearchTuner::SearchTuner(const char *filename, bool addused) {
        ifstream myfile;
        myfile.open (filename, ios::in);
        if (myfile.is_open()) {
@@ -86,6 +86,9 @@ SearchTuner::SearchTuner(const char *filename) {
                        }
                        setting->setDecision(lowValue, highValue, defaultValue, selectedValue);
                        settings.add(setting);
+                       if(addused){
+                               usedSettings.add(setting);
+                       }
                }
                myfile.close();
        } else {
index 7624425..935f527 100644 (file)
@@ -34,7 +34,7 @@ private:
 class SearchTuner : public Tuner {
 public:
        SearchTuner();
-       SearchTuner(const char *filename);
+       SearchTuner(const char *filename, bool addused = false);
        ~SearchTuner();
        virtual int getTunable(TunableParam param, TunableDesc *descriptor);
        int getVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor);