X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fnnue%2Fnnue_accumulator.h;h=8eba449746467539686facbc962f98ed2ee4b7e7;hb=77dfcbedce2861b2c6c5056d49e7a8731fea4256;hp=6b4390f9216aec1005a3569ff0c96abae1474c86;hpb=c4d67d77c99b99c9ac387ab622773a320f8d5cc3;p=stockfish diff --git a/src/nnue/nnue_accumulator.h b/src/nnue/nnue_accumulator.h index 6b4390f9..8eba4497 100644 --- a/src/nnue/nnue_accumulator.h +++ b/src/nnue/nnue_accumulator.h @@ -1,6 +1,6 @@ /* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 - Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file) + Copyright (C) 2004-2023 The Stockfish developers (see AUTHORS file) Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,18 +23,15 @@ #include "nnue_architecture.h" -namespace Eval::NNUE { - - // The accumulator of a StateInfo without parent is set to the INIT state - enum AccumulatorState { EMPTY, COMPUTED, INIT }; +namespace Stockfish::Eval::NNUE { // Class that holds the result of affine transformation of input features - struct alignas(kCacheLineSize) Accumulator { - std::int16_t - accumulation[2][kRefreshTriggers.size()][kTransformedFeatureDimensions]; - AccumulatorState state[2]; + struct alignas(CacheLineSize) Accumulator { + std::int16_t accumulation[2][TransformedFeatureDimensions]; + std::int32_t psqtAccumulation[2][PSQTBuckets]; + bool computed[2]; }; -} // namespace Eval::NNUE +} // namespace Stockfish::Eval::NNUE #endif // NNUE_ACCUMULATOR_H_INCLUDED