X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=8d9d01a71a7eff742bed41cce7bdf28c4d3ed391;hp=f27c04ec834ae4ef3b870b6a56739382b556ad2f;hb=158014b39d69eaaf791d4913b98ffde5c4d7a874;hpb=4e5d834e8e25c1120269fe3d0f20220ef2056cb8 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index f27c04ec..8d9d01a7 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -36,8 +36,8 @@ namespace { struct EvalInfo { // Pointers to material and pawn hash table entries - MaterialEntry* mi; - PawnEntry* pi; + Material::Entry* mi; + Pawns::Entry* pi; // attackedBy[color][piece type] is a bitboard representing all squares // attacked by a given color and piece type, attackedBy[color][0] contains @@ -367,7 +367,8 @@ Value do_evaluate(const Position& pos, Value& margin) { Score score, mobilityWhite, mobilityBlack; Key key = pos.key(); - Eval::Entry* e = pos.this_thread()->evalTable[key]; + Thread* th = pos.this_thread(); + Eval::Entry* e = th->evalTable[key]; // If e->key matches the position's hash key, it means that we have analysed // this node before, and we can simply return the information we found the last @@ -391,7 +392,7 @@ Value do_evaluate(const Position& pos, Value& margin) { score = pos.psq_score() + (pos.side_to_move() == WHITE ? Tempo : -Tempo); // Probe the material hash table - ei.mi = pos.this_thread()->materialTable.probe(pos); + ei.mi = Material::probe(pos, th->materialTable, th->endgames); score += ei.mi->material_value(); // If we have a specialized evaluation function for the current material @@ -404,7 +405,7 @@ Value do_evaluate(const Position& pos, Value& margin) { } // Probe the pawn hash table - ei.pi = pos.this_thread()->pawnTable.probe(pos); + ei.pi = Pawns::probe(pos, th->pawnsTable); score += ei.pi->pawns_value(); // Initialize attack and king safety bitboards