Remove per thread instances of Endgames. (#2056)

Similar to PSQT we only need one instance of the Endgames resource. The current per thread copies are identical and read only(after initialization) so from a design point of view it doesn't make sense to have them.

Tested for no slowdown.
http://tests.stockfishchess.org/tests/view/5c94377a0ebc5925cfff43ca
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 17320 W: 3487 L: 3359 D: 10474

No functional change.
This commit is contained in:
mstembera
2019-05-15 01:41:58 -07:00
committed by Marco Costalba
parent 44c320a572
commit 4a7b8180ec
5 changed files with 37 additions and 30 deletions

View File

@@ -137,7 +137,7 @@ Entry* probe(const Position& pos) {
// Let's look if we have a specialized evaluation function for this particular
// material configuration. Firstly we look for a fixed configuration one, then
// for a generic one if the previous search failed.
if ((e->evaluationFunction = pos.this_thread()->endgames.probe<Value>(key)) != nullptr)
if ((e->evaluationFunction = Endgames::probe<Value>(key)) != nullptr)
return e;
for (Color c = WHITE; c <= BLACK; ++c)
@@ -149,7 +149,7 @@ Entry* probe(const Position& pos) {
// OK, we didn't find any special evaluation function for the current material
// configuration. Is there a suitable specialized scaling function?
const auto* sf = pos.this_thread()->endgames.probe<ScaleFactor>(key);
const auto* sf = Endgames::probe<ScaleFactor>(key);
if (sf)
{