mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 10:36:26 +08:00
Refactor some threads related code.
This is a code style change that moves some pure thread code into the threads class.
It is a bit more code, but it makes search.cpp cleaner and easier to read by hiding some thread specific functionality.
STC (SMP)
LLR: 2.93 (-2.94,2.94) {-1.50,0.50}
Total: 75896 W: 12073 L: 12026 D: 51797
Ptnml(0-2): 828, 8224, 19872, 8121, 903
https://tests.stockfishchess.org/tests/view/5ed492e8f29b40b0fc95a74c
closes https://github.com/official-stockfish/Stockfish/pull/2720
No functional change.
This commit is contained in:
committed by
Joost VandeVondele
parent
b0eb5a1ba3
commit
1c65310c0e
@@ -109,6 +109,9 @@ struct ThreadPool : public std::vector<Thread*> {
|
||||
MainThread* main() const { return static_cast<MainThread*>(front()); }
|
||||
uint64_t nodes_searched() const { return accumulate(&Thread::nodes); }
|
||||
uint64_t tb_hits() const { return accumulate(&Thread::tbHits); }
|
||||
Thread* get_best_thread() const;
|
||||
void start_searching();
|
||||
void wait_for_search_finished() const;
|
||||
|
||||
std::atomic_bool stop, increaseDepth;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user