mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
fix missing condition
Fixes a bug in https://github.com/official-stockfish/Stockfish/pull/6453 https://github.com/official-stockfish/Stockfish/commit/abd835dcbc3a28481224f6253b00b7420d062513 The modifications to the DirtyThreats bitboards should only happen if PutPiece is true. This somehow didn't affect bench at the default parameters. Reference AVX2: ./stockfish.killdeer-fix.avx2 bench 64 1 23 Nodes searched : 178140156 Nodes/second : 1503152 before patch: ./stockfish.master.avx512icl bench 64 1 23 Nodes searched : 218349728 Nodes/second : 1743450 after patch: ./stockfish.killdeer-fix.avx512icl bench 64 1 23 Nodes searched : 178140156 Nodes/second : 1727520 passed STC: LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 39328 W: 10293 L: 10080 D: 18955 Ptnml(0-2): 113, 4306, 10629, 4487, 129 https://tests.stockfishchess.org/tests/view/692fb2d8b23dfeae38d01c81 closes https://github.com/official-stockfish/Stockfish/pull/6463 Bench: 2912398
This commit is contained in:
committed by
Joost VandeVondele
parent
5297ba0a1a
commit
c109a88ebe
@@ -1159,8 +1159,11 @@ void Position::update_piece_threats(Piece pc,
|
||||
if (!all_attackers)
|
||||
return; // Square s is threatened iff there's at least one attacker
|
||||
|
||||
if constexpr (PutPiece)
|
||||
{
|
||||
dts->threatenedSqs |= square_bb(s);
|
||||
dts->threateningSqs |= all_attackers;
|
||||
}
|
||||
|
||||
DirtyThreat dt_template{NO_PIECE, pc, Square(0), s, PutPiece};
|
||||
write_multiple_dirties<DirtyThreat::PcSqOffset, DirtyThreat::PcOffset>(*this, all_attackers,
|
||||
|
||||
Reference in New Issue
Block a user