mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-26 06:37:16 +00:00
Refactor accumulator storage/updates
Passed Non-regression STC: LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 115840 W: 29983 L: 29854 D: 56003 Ptnml(0-2): 338, 12990, 31149, 13091, 352 https://tests.stockfishchess.org/tests/view/67d0a044166a3e8781d84223 closes https://github.com/official-stockfish/Stockfish/pull/5927 No functional change
This commit is contained in:
@@ -77,8 +77,8 @@ template void HalfKAv2_hm::append_changed_indices<BLACK>(Square ksq,
|
||||
IndexList& removed,
|
||||
IndexList& added);
|
||||
|
||||
bool HalfKAv2_hm::requires_refresh(const StateInfo* st, Color perspective) {
|
||||
return st->dirtyPiece.piece[0] == make_piece(perspective, KING);
|
||||
bool HalfKAv2_hm::requires_refresh(const DirtyPiece& dirtyPiece, Color perspective) {
|
||||
return dirtyPiece.piece[0] == make_piece(perspective, KING);
|
||||
}
|
||||
|
||||
} // namespace Stockfish::Eval::NNUE::Features
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "../nnue_common.h"
|
||||
|
||||
namespace Stockfish {
|
||||
struct StateInfo;
|
||||
class Position;
|
||||
}
|
||||
|
||||
@@ -135,9 +134,9 @@ class HalfKAv2_hm {
|
||||
static void
|
||||
append_changed_indices(Square ksq, const DirtyPiece& dp, IndexList& removed, IndexList& added);
|
||||
|
||||
// Returns whether the change stored in this StateInfo means
|
||||
// Returns whether the change stored in this DirtyPiece means
|
||||
// that a full accumulator refresh is required.
|
||||
static bool requires_refresh(const StateInfo* st, Color perspective);
|
||||
static bool requires_refresh(const DirtyPiece& dirtyPiece, Color perspective);
|
||||
};
|
||||
|
||||
} // namespace Stockfish::Eval::NNUE::Features
|
||||
|
||||
Reference in New Issue
Block a user