X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.h;h=a1545072843a2dd9286c53db09d2b48c8bb8275c;hp=46ddb49529357f4cbefffa61ff1ecdc2b83bbdb9;hb=44f79bdf5a092c3acec0a8bf8f2c1440e5a9da90;hpb=a8de07cc26999e2fef7298a63bfe349aaa4650fa diff --git a/src/thread.h b/src/thread.h index 46ddb495..a1545072 100644 --- a/src/thread.h +++ b/src/thread.h @@ -42,8 +42,8 @@ class Thread { - Mutex mutex; - ConditionVariable cv; + std::mutex mutex; + std::condition_variable cv; size_t idx; bool exit = false, searching = true; // Set before starting std::thread NativeThread stdThread; @@ -56,10 +56,12 @@ public: void idle_loop(); void start_searching(); void wait_for_search_finished(); + int best_move_count(Move move); Pawns::Table pawnsTable; Material::Table materialTable; - size_t pvIdx, multiPV, pvLast, shuffleExts; + size_t pvIdx, pvLast; + uint64_t ttHitAverage; int selDepth, nmpMinPly; Color nmpColor; std::atomic nodes, tbHits, bestMoveChanges; @@ -70,7 +72,7 @@ public: CounterMoveHistory counterMoves; ButterflyHistory mainHistory; CapturePieceToHistory captureHistory; - ContinuationHistory continuationHistory; + ContinuationHistory continuationHistory[2][2]; Score contempt; }; @@ -86,6 +88,7 @@ struct MainThread : public Thread { double previousTimeReduction; Value previousScore; + Value iterValue[4]; int callsCnt; bool stopOnPonderhit; std::atomic_bool ponder;