X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbenchmark.cpp;h=8f3e6ae1939d0640675d4fc3ff47a79be3b33d7f;hp=e27e81fee5a838142cccdce9b46622d76d8ef50b;hb=aa242d2f84eaf2307f34d5356079125eaf5ff26a;hpb=be509525336b65419e708678abe4e16efb5f6f4d diff --git a/src/benchmark.cpp b/src/benchmark.cpp index e27e81fe..8f3e6ae1 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -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,9 +155,11 @@ void benchmark(const Position& current, istream& is) { else { + Search::StateStackPtr st; + limits.startTime = now(); Threads.start_thinking(pos, limits, st); - Threads.wait_for_think_finished(); - nodes += Search::RootPos.nodes_searched(); + Threads.main()->join(); + nodes += Threads.nodes_searched(); } }