mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Merge Stats tables
Use a recursive std::array with variadic template parameters to get rid of the last redundacy. The first template T parameter is the base type of the array, the W parameter is the weight applied to the bonuses when we update values with the << operator, the D parameter limits the range of updates (range is [-W * D, W * D]), and the last parameters (Size and Sizes) encode the dimensions of the array. This allows greater flexibility because we can now tweak the range [-W * D, W * D] for each table. Patch removes more lines than what adds and streamlines the Stats soup in movepick.h Closes PR#1422 and PR#1421 No functional change.
This commit is contained in:
committed by
Stéphane Nicolet
parent
94b3cdd908
commit
f35e52f030
@@ -62,9 +62,9 @@ void Thread::clear() {
|
||||
|
||||
for (auto& to : contHistory)
|
||||
for (auto& h : to)
|
||||
h.fill(0);
|
||||
h.get()->fill(0);
|
||||
|
||||
contHistory[NO_PIECE][0].fill(Search::CounterMovePruneThreshold - 1);
|
||||
contHistory[NO_PIECE][0].get()->fill(Search::CounterMovePruneThreshold - 1);
|
||||
}
|
||||
|
||||
/// Thread::start_searching() wakes up the thread that will start the search
|
||||
|
||||
Reference in New Issue
Block a user