]> git.sesse.net Git - stockfish/blobdiff - src/benchmark.cpp
Minor clean up of some function parameters
[stockfish] / src / benchmark.cpp
index e27e81fee5a838142cccdce9b46622d76d8ef50b..5c4c4e362368b121e0fb32d44e36fb0e1b1bc559 100644 (file)
@@ -26,7 +26,6 @@
 #include "position.h"
 #include "search.h"
 #include "thread.h"
-#include "tt.h"
 #include "uci.h"
 
 using namespace std;
@@ -104,7 +103,7 @@ void benchmark(const Position& current, istream& is) {
 
   Options["Hash"]    = ttSize;
   Options["Threads"] = threads;
-  TT.clear();
+  Search::reset();
 
   if (limitType == "time")
       limits.movetime = stoi(limit); // movetime is in ms
@@ -143,7 +142,6 @@ void benchmark(const Position& current, istream& is) {
   }
 
   uint64_t nodes = 0;
-  Search::StateStackPtr st;
   TimePoint elapsed = now();
 
   for (size_t i = 0; i < fens.size(); ++i)
@@ -157,8 +155,9 @@ void benchmark(const Position& current, istream& is) {
 
       else
       {
+          Search::StateStackPtr st;
           Threads.start_thinking(pos, limits, st);
-          Threads.wait_for_think_finished();
+          Threads.main()->join();
           nodes += Search::RootPos.nodes_searched();
       }
   }