]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Allow for general transposition table sizes. (#1341)
[stockfish] / src / thread.cpp
index d095aefeb6a6f875746a67ab68d782e32d031e28..58d693cf2a52547c4fc5f1140436293bd9fcda2d 100644 (file)
@@ -58,6 +58,7 @@ void Thread::clear() {
 
   counterMoves.fill(MOVE_NONE);
   mainHistory.fill(0);
+  captureHistory.fill(0);
 
   for (auto& to : contHistory)
       for (auto& h : to)
@@ -111,7 +112,7 @@ void Thread::idle_loop() {
 
 
 /// ThreadPool::init() creates and launches the threads that will go
-/// immediately to sleep in idle_loop. We cannot use the c'tor because
+/// immediately to sleep in idle_loop. We cannot use the constructor because
 /// Threads is a static object and we need a fully initialized engine at
 /// this point due to allocation of Endgames in the Thread constructor.
 
@@ -186,6 +187,8 @@ void ThreadPool::start_thinking(Position& pos, StateListPtr& states,
       th->rootDepth = th->completedDepth = DEPTH_ZERO;
       th->rootMoves = rootMoves;
       th->rootPos.set(pos.fen(), pos.is_chess960(), &setupStates->back(), th);
+      th->nmp_ply = 0;
+      th->pair = -1;
   }
 
   setupStates->back() = tmp;