mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +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
@@ -134,8 +134,6 @@ public:
|
||||
void undo_move(Move m);
|
||||
void do_null_move(StateInfo& newSt);
|
||||
void undo_null_move();
|
||||
void increment_nodes();
|
||||
void increment_tbHits();
|
||||
|
||||
// Static Exchange Evaluation
|
||||
bool see_ge(Move m, Value threshold = VALUE_ZERO) const;
|
||||
@@ -152,8 +150,6 @@ public:
|
||||
int game_ply() const;
|
||||
bool is_chess960() const;
|
||||
Thread* this_thread() const;
|
||||
uint64_t nodes_searched() const;
|
||||
uint64_t tb_hits() const;
|
||||
bool is_draw(int ply) const;
|
||||
int rule50_count() const;
|
||||
Score psq_score() const;
|
||||
@@ -187,8 +183,6 @@ private:
|
||||
int castlingRightsMask[SQUARE_NB];
|
||||
Square castlingRookSquare[CASTLING_RIGHT_NB];
|
||||
Bitboard castlingPath[CASTLING_RIGHT_NB];
|
||||
uint64_t nodes;
|
||||
uint64_t tbHits;
|
||||
int gamePly;
|
||||
Color sideToMove;
|
||||
Thread* thisThread;
|
||||
@@ -353,22 +347,6 @@ inline int Position::rule50_count() const {
|
||||
return st->rule50;
|
||||
}
|
||||
|
||||
inline uint64_t Position::nodes_searched() const {
|
||||
return nodes;
|
||||
}
|
||||
|
||||
inline void Position::increment_nodes() {
|
||||
nodes++;
|
||||
}
|
||||
|
||||
inline uint64_t Position::tb_hits() const {
|
||||
return tbHits;
|
||||
}
|
||||
|
||||
inline void Position::increment_tbHits() {
|
||||
tbHits++;
|
||||
}
|
||||
|
||||
inline bool Position::opposite_bishops() const {
|
||||
return pieceCount[W_BISHOP] == 1
|
||||
&& pieceCount[B_BISHOP] == 1
|
||||
|
||||
Reference in New Issue
Block a user