Simplify HalfKAv2_hm::write_indices()

https://tests.stockfishchess.org/tests/view/69bb1fafd7d60419badf31a3
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 116544 W: 30024 L: 29895 D: 56625
Ptnml(0-2): 317, 12875, 31729, 13064, 287

closes https://github.com/official-stockfish/Stockfish/pull/6677

No functional change
This commit is contained in:
mstembera
2026-04-09 21:53:01 +02:00
committed by Disservin
parent 82908e0fd6
commit 969542e4f0
4 changed files with 39 additions and 55 deletions
+2 -7
View File
@@ -1184,13 +1184,8 @@ void write_multiple_dirties(const Position& p,
DirtyThreats* dts) {
static_assert(sizeof(DirtyThreat) == 4);
const __m512i board = _mm512_loadu_si512(p.piece_array().data());
const __m512i AllSquares = _mm512_set_epi8(
63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41,
40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18,
17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
const int dt_count = popcount(mask);
const __m512i board = _mm512_loadu_si512(p.piece_array().data());
const int dt_count = popcount(mask);
assert(dt_count <= 16);
const __m512i template_v = _mm512_set1_epi32(dt_template.raw());