diff --git a/src/history.h b/src/history.h index 09041d4ad..d5a23e516 100644 --- a/src/history.h +++ b/src/history.h @@ -132,7 +132,7 @@ using LowPlyHistory = Stats; // PieceToHistory is like ButterflyHistory but is addressed by a move's [piece][to] -using PieceToHistory = Stats; +using PieceToHistory = AtomicStats; // ContinuationHistory is the combined history of a given pair of moves, usually // the current one given a previous one. The nested history table is based on @@ -238,6 +238,7 @@ struct SharedHistories { } UnifiedCorrectionHistory correctionHistory; + ContinuationHistory continuationHistory[2][2]; PawnHistory pawnHistory; diff --git a/src/search.cpp b/src/search.cpp index b497552ae..30d83c712 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -165,6 +165,7 @@ Search::Worker::Worker(SharedState& sharedState, NumaReplicatedAccessToken token) : // Unpack the SharedState struct into member variables sharedHistory(sharedState.sharedHistories.at(token.get_numa_index())), + continuationHistory(sharedHistory.continuationHistory), threadIdx(threadId), numaThreadIdx(numaThreadId), numaTotal(numaTotalThreads), diff --git a/src/search.h b/src/search.h index ca605c68f..68fb99111 100644 --- a/src/search.h +++ b/src/search.h @@ -336,11 +336,11 @@ class Worker { LowPlyHistory lowPlyHistory; CapturePieceToHistory captureHistory; - ContinuationHistory continuationHistory[2][2]; CorrectionHistory continuationCorrectionHistory; TTMoveHistory ttMoveHistory; SharedHistories& sharedHistory; + ContinuationHistory (&continuationHistory)[2][2]; private: bool iterative_deepening();