mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 16:47:37 +00:00
Small cleanups
closes https://github.com/official-stockfish/Stockfish/pull/2756 No functional change
This commit is contained in:
+10
-3
@@ -52,6 +52,7 @@ Thread::~Thread() {
|
||||
stdThread.join();
|
||||
}
|
||||
|
||||
|
||||
/// Thread::bestMoveCount(Move move) return best move counter for the given root move
|
||||
|
||||
int Thread::best_move_count(Move move) const {
|
||||
@@ -62,6 +63,7 @@ int Thread::best_move_count(Move move) const {
|
||||
return rm != rootMoves.begin() + pvLast ? rm->bestMoveCount : 0;
|
||||
}
|
||||
|
||||
|
||||
/// Thread::clear() reset histories, usually before a new game
|
||||
|
||||
void Thread::clear() {
|
||||
@@ -81,6 +83,7 @@ void Thread::clear() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Thread::start_searching() wakes up the thread that will start the search
|
||||
|
||||
void Thread::start_searching() {
|
||||
@@ -158,7 +161,8 @@ void ThreadPool::set(size_t requested) {
|
||||
}
|
||||
}
|
||||
|
||||
/// ThreadPool::clear() sets threadPool data to initial values.
|
||||
|
||||
/// ThreadPool::clear() sets threadPool data to initial values
|
||||
|
||||
void ThreadPool::clear() {
|
||||
|
||||
@@ -170,6 +174,7 @@ void ThreadPool::clear() {
|
||||
main()->previousTimeReduction = 1.0;
|
||||
}
|
||||
|
||||
|
||||
/// ThreadPool::start_thinking() wakes up main thread waiting in idle_loop() and
|
||||
/// returns immediately. Main thread will wake up other threads and start the search.
|
||||
|
||||
@@ -250,7 +255,8 @@ Thread* ThreadPool::get_best_thread() const {
|
||||
return bestThread;
|
||||
}
|
||||
|
||||
/// Start non-main threads.
|
||||
|
||||
/// Start non-main threads
|
||||
|
||||
void ThreadPool::start_searching() {
|
||||
|
||||
@@ -259,7 +265,8 @@ void ThreadPool::start_searching() {
|
||||
th->start_searching();
|
||||
}
|
||||
|
||||
/// Wait for non-main threads.
|
||||
|
||||
/// Wait for non-main threads
|
||||
|
||||
void ThreadPool::wait_for_search_finished() const {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user