Fix missing initialization of AccumulatorCaches in Eval::trace

Add a constructor to `AccumulatorCaches` instead of just calling
`clear(networks)` to prevent similar issues from appearing in the
future.

fixes https://github.com/official-stockfish/Stockfish/issues/5190

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

No functional change
This commit is contained in:
Disservin
2024-04-25 19:20:57 +02:00
parent 886ed90ec3
commit 3502c8ae42
4 changed files with 11 additions and 7 deletions
+5
View File
@@ -50,6 +50,11 @@ struct alignas(CacheLineSize) Accumulator {
// is commonly referred to as "Finny Tables".
struct AccumulatorCaches {
template<typename Networks>
AccumulatorCaches(const Networks& networks) {
clear(networks);
}
template<IndexType Size>
struct alignas(CacheLineSize) Cache {