mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 06:17:49 +00:00
Assorted cleanups
Assorted cleanups closes https://github.com/official-stockfish/Stockfish/pull/5046 No functional change Co-Authored-By: Shahin M. Shahin <41402573+peregrineshahin@users.noreply.github.com> Co-Authored-By: cj5716 <125858804+cj5716@users.noreply.github.com>
This commit is contained in:
+7
-11
@@ -47,7 +47,6 @@ enum NodeType {
|
||||
class TranspositionTable;
|
||||
class ThreadPool;
|
||||
class OptionsMap;
|
||||
class UCI;
|
||||
|
||||
namespace Search {
|
||||
|
||||
@@ -124,10 +123,12 @@ 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& o, ThreadPool& tp, TranspositionTable& t) :
|
||||
options(o),
|
||||
threads(tp),
|
||||
tt(t) {}
|
||||
SharedState(const OptionsMap& optionsMap,
|
||||
ThreadPool& threadPool,
|
||||
TranspositionTable& transpositionTable) :
|
||||
options(optionsMap),
|
||||
threads(threadPool),
|
||||
tt(transpositionTable) {}
|
||||
|
||||
const OptionsMap& options;
|
||||
ThreadPool& threads;
|
||||
@@ -209,11 +210,7 @@ class Worker {
|
||||
template<NodeType nodeType>
|
||||
Value qsearch(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth = 0);
|
||||
|
||||
Depth reduction(bool i, Depth d, int mn, int delta) {
|
||||
int reductionScale = reductions[d] * reductions[mn];
|
||||
return (reductionScale + 1177 - int(delta) * 776 / int(rootDelta)) / 1024
|
||||
+ (!i && reductionScale > 842);
|
||||
}
|
||||
Depth reduction(bool i, Depth d, int mn, int delta);
|
||||
|
||||
// Get a pointer to the search manager, only allowed to be called by the
|
||||
// main thread.
|
||||
@@ -251,7 +248,6 @@ class Worker {
|
||||
TranspositionTable& tt;
|
||||
|
||||
friend class Stockfish::ThreadPool;
|
||||
friend class Stockfish::UCI;
|
||||
friend class SearchManager;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user