X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=317645331c5c1d45ebaac7cbc42e9aca06e4fbbe;hp=10d491c025e7e9a2383472b812010f9a5dc74839;hb=7eaea3848c9e8a388c0b79cee6fba6bf3cd32108;hpb=ee7a68ea5fc07e331df462b10f35dc770e9409c5 diff --git a/src/search.cpp b/src/search.cpp index 10d491c0..31764533 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -40,7 +40,6 @@ namespace Search { SignalsType Signals; LimitsType Limits; - StateStackPtr SetupStates; } namespace Tablebases { @@ -317,16 +316,8 @@ void MainThread::search() { } for (Thread* th : Threads) - { - th->maxPly = 0; - th->rootDepth = DEPTH_ZERO; if (th != this) - { - th->rootPos = Position(rootPos, th); - th->rootMoves = rootMoves; th->start_searching(); - } - } Thread::search(); // Let's start searching! } @@ -1488,7 +1479,7 @@ moves_loop: // When in check search starts from here Move Skill::pick_best(size_t multiPV) { - const Search::RootMoveVector& rootMoves = Threads.main()->rootMoves; + const RootMoves& rootMoves = Threads.main()->rootMoves; static PRNG rng(now()); // PRNG sequence should be non-deterministic // RootMoves are already sorted by score in descending order @@ -1553,7 +1544,7 @@ string UCI::pv(const Position& pos, Depth depth, Value alpha, Value beta) { std::stringstream ss; int elapsed = Time.elapsed() + 1; - const Search::RootMoveVector& rootMoves = pos.this_thread()->rootMoves; + const RootMoves& rootMoves = pos.this_thread()->rootMoves; size_t PVIdx = pos.this_thread()->PVIdx; size_t multiPV = std::min((size_t)Options["MultiPV"], rootMoves.size()); uint64_t nodes_searched = Threads.nodes_searched();