X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.h;h=c7abb9dcfd97a2b5b47b87f798fc4e5718cd2bb7;hp=c7a452086b9e7c9364d2ff4491b5dbfdcf8433de;hb=5066e17eba4b9d4217a8d173de56e40e0e05fc6d;hpb=0af24a14455bbcde181fff7632722ce55419991e diff --git a/src/search.h b/src/search.h index c7a45208..c7abb9dc 100644 --- a/src/search.h +++ b/src/search.h @@ -47,6 +47,7 @@ struct Stack { Depth reduction; Value staticEval; bool skipEarlyPruning; + int moveCount; }; /// RootMove struct is used for moves at the root of the tree. For each root move @@ -76,7 +77,7 @@ typedef std::vector RootMoveVector; struct LimitsType { LimitsType() { // Init explicitly due to broken value-initialization of non POD in MSVC - nodes = time[WHITE] = time[BLACK] = inc[WHITE] = inc[BLACK] = movestogo = + nodes = time[WHITE] = time[BLACK] = inc[WHITE] = inc[BLACK] = npmsec = movestogo = depth = movetime = mate = infinite = ponder = 0; } @@ -85,8 +86,9 @@ struct LimitsType { } std::vector searchmoves; - int time[COLOR_NB], inc[COLOR_NB], movestogo, depth, movetime, mate, infinite, ponder; + int time[COLOR_NB], inc[COLOR_NB], npmsec, movestogo, depth, movetime, mate, infinite, ponder; int64_t nodes; + TimePoint startTime; }; /// The SignalsType struct stores volatile flags updated during the search @@ -100,13 +102,10 @@ typedef std::unique_ptr> StateStackPtr; extern volatile SignalsType Signals; extern LimitsType Limits; -extern RootMoveVector RootMoves; -extern Position RootPos; -extern Time::point SearchTime; extern StateStackPtr SetupStates; void init(); -void think(); +void reset(); template uint64_t perft(Position& pos, Depth depth); } // namespace Search