X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fbenchmark.cpp;h=33e266898e415f5515fe9d965d13959726ade919;hb=8315620522dd268755f32be792802abb62f7366f;hp=8f3e6ae1939d0640675d4fc3ff47a79be3b33d7f;hpb=ecc5ff6693f116f4a8ae5f5080252f29b279c0a1;p=stockfish diff --git a/src/benchmark.cpp b/src/benchmark.cpp index 8f3e6ae1..33e26689 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -91,8 +91,8 @@ const vector Defaults = { void benchmark(const Position& current, istream& is) { string token; - Search::LimitsType limits; vector fens; + Search::LimitsType limits; // Assign default values to missing arguments string ttSize = (is >> token) ? token : "16"; @@ -103,10 +103,10 @@ void benchmark(const Position& current, istream& is) { Options["Hash"] = ttSize; Options["Threads"] = threads; - Search::reset(); + Search::clear(); if (limitType == "time") - limits.movetime = stoi(limit); // movetime is in ms + limits.movetime = stoi(limit); // movetime is in millisecs else if (limitType == "nodes") limits.nodes = stoi(limit); @@ -151,14 +151,14 @@ void benchmark(const Position& current, istream& is) { cerr << "\nPosition: " << i + 1 << '/' << fens.size() << endl; if (limitType == "perft") - nodes += Search::perft(pos, limits.depth * ONE_PLY); + nodes += Search::perft(pos, limits.depth * ONE_PLY); else { Search::StateStackPtr st; limits.startTime = now(); Threads.start_thinking(pos, limits, st); - Threads.main()->join(); + Threads.main()->wait_for_search_finished(); nodes += Threads.nodes_searched(); } }