mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Fix an assert in SMP case
SMP case is very tricky and raises an assert in stage_moves(): assert(stage == KILLERS_S1 || stage == QUIETS_1_S1 || stage == QUIETS_2_S1) So rewrite the code to just return moves[] when we are sure we are in quiet moves stages. Also rename stage_moves to quiet_moves to reflect that. No functional change (but needs testing in SMP case)
This commit is contained in:
@@ -140,12 +140,12 @@ MovePicker::MovePicker(const Position& p, Move ttm, const HistoryStats& h, Piece
|
||||
}
|
||||
|
||||
|
||||
/// stage_moves() returns a pointer to the beginning of moves array. It
|
||||
/// quiet_moves() returns a pointer to the beginning of moves array. It
|
||||
/// is used to access already tried quiet moves when updating history.
|
||||
|
||||
const ExtMove* MovePicker::stage_moves() const {
|
||||
assert(stage == KILLERS_S1 || stage == QUIETS_1_S1 || stage == QUIETS_2_S1);
|
||||
return stage == KILLERS_S1 ? killers : moves;
|
||||
const ExtMove* MovePicker::quiet_moves() const {
|
||||
return stage == KILLERS_S1 ? killers
|
||||
: stage == QUIETS_1_S1 || stage == QUIETS_2_S1 ? moves : NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user