Merge pull request #192 from rektdie/fix-qs-tt-write
check for stop before writing into qs tt (cutnode) | bench 1402552
This commit was merged in pull request #192.
This commit is contained in:
1 file changed
+1
@@ -374,6 +374,7 @@ static SearchResults Quiescence(Board& board, int alpha, int beta, int ply, Sear
|
|||||||
int score = -Quiescence<isPV, mode>(copy, -beta, -alpha, ply + 1, ctx).score;
|
int score = -Quiescence<isPV, mode>(copy, -beta, -alpha, ply + 1, ctx).score;
|
||||||
|
|
||||||
if (score >= beta) {
|
if (score >= beta) {
|
||||||
|
if (searchStopped.load(std::memory_order_relaxed)) return 0;
|
||||||
ctx->TT->WriteEntry(board.hashKey, 0, score, CutNode, currMove, ttpv);
|
ctx->TT->WriteEntry(board.hashKey, 0, score, CutNode, currMove, ttpv);
|
||||||
return score;
|
return score;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user