mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 03:26:24 +08:00
Add gensfen_nonpv
This commit is contained in:
@@ -55,6 +55,7 @@ class Thread {
|
||||
size_t idx;
|
||||
bool exit = false, searching = true; // Set before starting std::thread
|
||||
std::function<void(Thread&)> worker;
|
||||
std::function<void(Position&)> on_eval_callback;
|
||||
NativeThread stdThread;
|
||||
|
||||
public:
|
||||
@@ -75,6 +76,13 @@ public:
|
||||
void wait_for_worker_finished();
|
||||
size_t thread_idx() const { return idx; }
|
||||
|
||||
template <typename FuncT>
|
||||
void set_eval_callback(FuncT&& f) { on_eval_callback = std::forward<FuncT>(f); }
|
||||
|
||||
void clear_eval_callback() { on_eval_callback = nullptr; }
|
||||
|
||||
void on_eval() { if (on_eval_callback) on_eval_callback(rootPos); }
|
||||
|
||||
Pawns::Table pawnsTable;
|
||||
Material::Table materialTable;
|
||||
size_t pvIdx, pvLast;
|
||||
|
||||
Reference in New Issue
Block a user