mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 10:06:26 +08:00
Only main thread checks time
The main change of the patch is that now time check is done only by main thread. In the past, before lazy SMP, we needed all the threds to check for available time because main thread could have been blocked on a split point, now this is no more the case and main thread can do the job alone, greatly simplifying the logic. Verified for regression testing on STC with 7 threads: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 11895 W: 1741 L: 1608 D: 8546 No functional change. Closes #1152
This commit is contained in:
committed by
Joona Kiiski
parent
fa1e3427bd
commit
05513a6641
@@ -60,15 +60,13 @@ public:
|
||||
Material::Table materialTable;
|
||||
Endgames endgames;
|
||||
size_t idx, PVIdx;
|
||||
int maxPly, callsCnt;
|
||||
std::atomic<uint64_t> tbHits;
|
||||
std::atomic<uint64_t> nodes;
|
||||
int maxPly;
|
||||
std::atomic<uint64_t> nodes, tbHits;
|
||||
|
||||
Position rootPos;
|
||||
Search::RootMoves rootMoves;
|
||||
std::atomic<Depth> rootDepth;
|
||||
Depth completedDepth;
|
||||
std::atomic_bool resetCalls;
|
||||
CounterMoveStat counterMoves;
|
||||
ButterflyHistory history;
|
||||
CounterMoveHistoryStat counterMoveHistory;
|
||||
@@ -79,10 +77,12 @@ public:
|
||||
|
||||
struct MainThread : public Thread {
|
||||
virtual void search();
|
||||
void check_time();
|
||||
|
||||
bool easyMovePlayed, failedLow;
|
||||
double bestMoveChanges;
|
||||
Value previousScore;
|
||||
int callsCnt = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user