mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 02:47:45 +00:00
Refactor Stats Array
* Limit use of `StatsEntry` wrapper to arithmetic types * Generalize `Stats` to `MultiArray` by discarding the template parameter `D` * Allow `MultiArray::fill` to take any type assignable to element type * Remove now-unused operator overloads on `StatsEntry` closes https://github.com/official-stockfish/Stockfish/pull/5750 No functional change
This commit is contained in:
+2
-2
@@ -510,13 +510,13 @@ void Search::Worker::clear() {
|
||||
|
||||
for (auto& to : continuationCorrectionHistory)
|
||||
for (auto& h : to)
|
||||
h->fill(0);
|
||||
h.fill(0);
|
||||
|
||||
for (bool inCheck : {false, true})
|
||||
for (StatsType c : {NoCaptures, Captures})
|
||||
for (auto& to : continuationHistory[inCheck][c])
|
||||
for (auto& h : to)
|
||||
h->fill(-427);
|
||||
h.fill(-427);
|
||||
|
||||
for (size_t i = 1; i < reductions.size(); ++i)
|
||||
reductions[i] = int(19.43 * std::log(i));
|
||||
|
||||
Reference in New Issue
Block a user