Merge commit 'a169c78b6d3b082068deb49a39aaa1fd75464c7f' into cluster

This commit is contained in:
Steinar H. Gunderson
2025-12-24 16:18:37 +01:00
19 changed files with 1419 additions and 290 deletions
+18 -19
View File
@@ -34,19 +34,17 @@
#include "cluster.h"
#include "misc.h"
#include "movepick.h"
#include "nnue/network.h"
#include "nnue/nnue_accumulator.h"
#include "numa.h"
#include "position.h"
#include "score.h"
#include "syzygy/tbprobe.h"
#include "timeman.h"
#include "types.h"
#include "nnue/nnue_accumulator.h"
namespace Stockfish {
namespace Eval::NNUE {
struct Networks;
}
// Different node types, used as a template parameter
enum NodeType {
NonPV,
@@ -135,19 +133,19 @@ struct LimitsType {
// The UCI stores the uci options, thread pool, and transposition table.
// This struct is used to easily forward data to the Search::Worker class.
struct SharedState {
SharedState(const OptionsMap& optionsMap,
ThreadPool& threadPool,
TranspositionTable& transpositionTable,
const Eval::NNUE::Networks& nets) :
SharedState(const OptionsMap& optionsMap,
ThreadPool& threadPool,
TranspositionTable& transpositionTable,
const NumaReplicated<Eval::NNUE::Networks>& nets) :
options(optionsMap),
threads(threadPool),
tt(transpositionTable),
networks(nets) {}
const OptionsMap& options;
ThreadPool& threads;
TranspositionTable& tt;
const Eval::NNUE::Networks& networks;
const OptionsMap& options;
ThreadPool& threads;
TranspositionTable& tt;
const NumaReplicated<Eval::NNUE::Networks>& networks;
};
class Worker;
@@ -246,7 +244,7 @@ class NullSearchManager: public ISearchManager {
// of the search history, and storing data required for the search.
class Worker {
public:
Worker(SharedState&, std::unique_ptr<ISearchManager>, size_t);
Worker(SharedState&, std::unique_ptr<ISearchManager>, size_t, NumaReplicatedAccessToken);
// Called at instantiation to initialize Reductions tables
// Reset histories, usually before a new game
@@ -325,7 +323,8 @@ class Worker {
Depth rootDepth, completedDepth;
Value rootDelta;
size_t thread_idx;
size_t thread_idx;
NumaReplicatedAccessToken numaAccessToken;
// Reductions lookup table initialized at startup
std::array<int, MAX_MOVES> reductions; // [depth or moveNumber]
@@ -335,10 +334,10 @@ class Worker {
Tablebases::Config tbConfig;
const OptionsMap& options;
ThreadPool& threads;
TranspositionTable& tt;
const Eval::NNUE::Networks& networks;
const OptionsMap& options;
ThreadPool& threads;
TranspositionTable& tt;
const NumaReplicated<Eval::NNUE::Networks>& networks;
// Used by NNUE
Eval::NNUE::AccumulatorCaches refreshTable;