]> git.sesse.net Git - stockfish/blobdiff - src/thread.h
Merge remote-tracking branch 'upstream/master' into clusterMergeMaster7
[stockfish] / src / thread.h
index b3bed46ac3cc28d78f5c925df595f1e6e1f53880..efb0f8de57f33fb395252f19f13ecea53e0e6d8e 100644 (file)
@@ -33,7 +33,7 @@
 #include "pawns.h"
 #include "position.h"
 #include "search.h"
-#include "thread_win32.h"
+#include "thread_win32_osx.h"
 
 
 /// Thread class keeps together all the thread-related stuff. We use
 
 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
-  std::thread stdThread;
+  NativeThread stdThread;
 
 public:
   explicit Thread(size_t);
@@ -57,14 +57,14 @@ public:
   void idle_loop();
   void start_searching();
   void wait_for_search_finished();
+  int best_move_count(Move move);
 
   Pawns::Table pawnsTable;
   Material::Table materialTable;
-  Endgames endgames;
-  size_t pvIdx, pvLast;
+  size_t pvIdx, pvLast, shuffleExts;
   int selDepth, nmpMinPly;
   Color nmpColor;
-  std::atomic<uint64_t> nodes, tbHits, TTsaves;
+  std::atomic<uint64_t> nodes, tbHits, TTsaves, bestMoveChanges;
 
   Position rootPos;
   Search::RootMoves rootMoves;
@@ -72,12 +72,12 @@ public:
   CounterMoveHistory counterMoves;
   ButterflyHistory mainHistory;
   CapturePieceToHistory captureHistory;
-  ContinuationHistory continuationHistory;
+  ContinuationHistory continuationHistory[2][2];
   Score contempt;
 
 #ifdef USE_MPI
   struct {
-      Mutex mutex;
+      std::mutex mutex;
       Cluster::TTCache<Cluster::TTCacheSize> buffer = {};
   } ttCache;
 #endif
@@ -93,7 +93,7 @@ struct MainThread : public Thread {
   void search() override;
   void check_time();
 
-  double bestMoveChanges, previousTimeReduction;
+  double previousTimeReduction;
   Value previousScore;
   int callsCnt;
   bool stopOnPonderhit;