mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Remove unused search-layer APIs
The following have zero call sites repo-wide:
SearchManager:🆔 never read or written (also never initialized, nor was it ever used).
Search::Worker::elapsed_time(): never called. PV output uses tm.elapsed_time() (TimeManager) directly. (removed callers on 25361e5)
MovePicker::begin()/end(): unused private accessors. (removed callers on 8c2d21f)
closes https://github.com/official-stockfish/Stockfish/pull/6909
No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
1ece3c030d
commit
5b87bc48cd
@@ -56,8 +56,6 @@ class MovePicker {
|
|||||||
Move select(Pred);
|
Move select(Pred);
|
||||||
template<GenType T>
|
template<GenType T>
|
||||||
ExtMove* score(const MoveList<T>&);
|
ExtMove* score(const MoveList<T>&);
|
||||||
ExtMove* begin() { return cur; }
|
|
||||||
ExtMove* end() { return endCur; }
|
|
||||||
|
|
||||||
const Position& pos;
|
const Position& pos;
|
||||||
const ButterflyHistory* mainHistory;
|
const ButterflyHistory* mainHistory;
|
||||||
|
|||||||
@@ -1836,16 +1836,10 @@ int Search::Worker::reduction(bool i, Depth d, int mn, int delta) const {
|
|||||||
// 'nodestime' option is enabled, it will return the count of nodes searched
|
// 'nodestime' option is enabled, it will return the count of nodes searched
|
||||||
// instead. This function is called to check whether the search should be
|
// instead. This function is called to check whether the search should be
|
||||||
// stopped based on predefined thresholds like time limits or nodes searched.
|
// stopped based on predefined thresholds like time limits or nodes searched.
|
||||||
//
|
|
||||||
// elapsed_time() returns the actual time elapsed since the start of the search.
|
|
||||||
// This function is intended for use only when printing PV outputs, and not used
|
|
||||||
// for making decisions within the search algorithm itself.
|
|
||||||
TimePoint Search::Worker::elapsed() const {
|
TimePoint Search::Worker::elapsed() const {
|
||||||
return main_manager()->tm.elapsed([this]() { return threads.nodes_searched(); });
|
return main_manager()->tm.elapsed([this]() { return threads.nodes_searched(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
TimePoint Search::Worker::elapsed_time() const { return main_manager()->tm.elapsed_time(); }
|
|
||||||
|
|
||||||
Value Search::Worker::evaluate(const Position& pos) {
|
Value Search::Worker::evaluate(const Position& pos) {
|
||||||
return Eval::evaluate(network[numaAccessToken], pos, accumulatorStack, refreshTable,
|
return Eval::evaluate(network[numaAccessToken], pos, accumulatorStack, refreshTable,
|
||||||
optimism[pos.side_to_move()]);
|
optimism[pos.side_to_move()]);
|
||||||
|
|||||||
@@ -298,8 +298,6 @@ class SearchManager: public ISearchManager {
|
|||||||
Value bestPreviousAverageScore;
|
Value bestPreviousAverageScore;
|
||||||
bool stopOnPonderhit;
|
bool stopOnPonderhit;
|
||||||
|
|
||||||
usize id;
|
|
||||||
|
|
||||||
const UpdateContext& updates;
|
const UpdateContext& updates;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -370,7 +368,6 @@ class Worker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TimePoint elapsed() const;
|
TimePoint elapsed() const;
|
||||||
TimePoint elapsed_time() const;
|
|
||||||
|
|
||||||
Value evaluate(const Position&);
|
Value evaluate(const Position&);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user