projects
/
satune.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5cdb9af
)
BUGFIX: when ONE or TWO tuner cannot solve a problem
author
Hamed Gorjiara
<hgorjiar@uci.edu>
Tue, 22 Oct 2019 20:57:45 +0000
(13:57 -0700)
committer
Hamed Gorjiara
<hgorjiar@uci.edu>
Tue, 22 Oct 2019 20:57:45 +0000
(13:57 -0700)
src/Tuner/comptuner.cc
patch
|
blob
|
history
diff --git
a/src/Tuner/comptuner.cc
b/src/Tuner/comptuner.cc
index 64e58a052c18f0d8d7c165ebe2274e4c2d4f360c..d630f2d2280d77fc09b259275901710a46c614d2 100644
(file)
--- a/
src/Tuner/comptuner.cc
+++ b/
src/Tuner/comptuner.cc
@@
-4,6
+4,7
@@
#include "searchtuner.h"
#include <iostream>
#include <fstream>
#include "searchtuner.h"
#include <iostream>
#include <fstream>
+#include <limits>
#include "solver_interface.h"
CompTuner::CompTuner(uint _budget, uint _timeout) :
#include "solver_interface.h"
CompTuner::CompTuner(uint _budget, uint _timeout) :
@@
-30,12
+31,14
@@
void CompTuner::findBestTwoTuners() {
for (uint l = 0; l < problems.getSize(); l++) {
Problem *problem = problems.get(l);
long long time1 = tuner1->getTime(problem);
for (uint l = 0; l < problems.getSize(); l++) {
Problem *problem = problems.get(l);
long long time1 = tuner1->getTime(problem);
+ if(time1 == -1){
+ time1=LLONG_MAX;
+ }
long long time2 = tuner2->getTime(problem);
long long time2 = tuner2->getTime(problem);
- long long minTime =DBL_MAX;
- if(time1 != -1 || time2 != -1){
- minTime = min(time1,time2);
+ if(time2 == -1){
+ time2 = LLONG_MAX;
}
}
- mintimes[l] = pow(min
Time
, (double)1 / problems.getSize());
+ mintimes[l] = pow(min
(time1,time2)
, (double)1 / problems.getSize());
}
double result = 1;
for (uint l = 0; l < problems.getSize(); l++) {
}
double result = 1;
for (uint l = 0; l < problems.getSize(); l++) {