mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Implement PEXT based attacks
According to: https://chessprogramming.wikispaces.com/BMI2#PEXTBitboards No functional change.
This commit is contained in:
@@ -296,7 +296,12 @@ namespace {
|
||||
b = size = 0;
|
||||
do {
|
||||
occupancy[size] = b;
|
||||
reference[size++] = sliding_attack(deltas, s, b);
|
||||
reference[size] = sliding_attack(deltas, s, b);
|
||||
|
||||
if (HasPext)
|
||||
attacks[s][pext(occupancy[size], masks[s])] = reference[size];
|
||||
|
||||
size++;
|
||||
b = (b - masks[s]) & masks[s];
|
||||
} while (b);
|
||||
|
||||
@@ -305,6 +310,9 @@ namespace {
|
||||
if (s < SQ_H8)
|
||||
attacks[s + 1] = attacks[s] + size;
|
||||
|
||||
if (HasPext)
|
||||
continue;
|
||||
|
||||
booster = MagicBoosters[Is64Bit][rank_of(s)];
|
||||
|
||||
// Find a magic for square 's' picking up an (almost) random number
|
||||
|
||||
Reference in New Issue
Block a user