mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
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:
committed by
Marco Costalba
parent
44c320a572
commit
4a7b8180ec
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user