]> git.sesse.net Git - stockfish/blobdiff - src/nnue/nnue_accumulator.h
Add Stockfish namespace.
[stockfish] / src / nnue / nnue_accumulator.h
index 263707102019f8596ab11c3558afc970e8479acb..55fafa138fc77203b4612f2b7162ccc25a6d047b 100644 (file)
@@ -1,6 +1,6 @@
 /*
   Stockfish, a UCI chess playing engine derived from Glaurung 2.1
-  Copyright (C) 2004-2020 The Stockfish developers (see AUTHORS file)
+  Copyright (C) 2004-2021 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
 
 #include "nnue_architecture.h"
 
-namespace Eval::NNUE {
+namespace Stockfish::Eval::NNUE {
+
+  // The accumulator of a StateInfo without parent is set to the INIT state
+  enum AccumulatorState { EMPTY, COMPUTED, INIT };
 
   // Class that holds the result of affine transformation of input features
   struct alignas(kCacheLineSize) Accumulator {
     std::int16_t
         accumulation[2][kRefreshTriggers.size()][kTransformedFeatureDimensions];
-    bool computed_accumulation;
+    AccumulatorState state[2];
   };
 
-}  // namespace Eval::NNUE
+}  // namespace Stockfish::Eval::NNUE
 
 #endif // NNUE_ACCUMULATOR_H_INCLUDED