Bug fix: typos
[satune.git] / src / Test / analyzemultituner.cc
1 #include "csolver.h"
2 #include "comptuner.h"
3 #include "searchtuner.h"
4 #include "dirent.h"
5
6 uint getNumberOfRuns(){
7         uint runs = 0;
8         DIR *dir;
9         struct dirent *ent;
10         if ((dir = opendir ("./")) != NULL) {
11                 /* print all the files and directories within directory */
12                 while ((ent = readdir (dir)) != NULL) {
13                         if(strstr(ent->d_name, "result") != NULL){
14                                 runs++;
15                         }
16                 }
17                 closedir (dir);
18         } else {
19                 perror ("Unable to open the directory\n");
20                 exit(1);
21         }
22         return runs;
23 }
24
25 int main(int argc, char **argv) {
26         uint numruns = getNumberOfRuns();
27         printf("Number of Runs: %u\n", numruns);
28         CompTuner *multituner = new CompTuner(0, 0);
29         multituner->readData(numruns);
30         multituner->findBestTwoTuners();
31         delete multituner;
32         return 0;
33 }