mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Introduce Score struct
Save mid and end game scores in an union so to operate on both values in one instruction. This patch just introduces the infrastructure and changes EvalInfo to use a single Score value instead of mgValue and egValue. Speed is more or less the same because we still don't use unified midgame-endgame tables where the single assignment optimization can prove effective. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
//// Includes
|
||||
////
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "material.h"
|
||||
#include "pawns.h"
|
||||
|
||||
@@ -46,7 +48,7 @@ class Position;
|
||||
struct EvalInfo {
|
||||
|
||||
// Middle game and endgame evaluations
|
||||
Value mgValue, egValue;
|
||||
Score value;
|
||||
|
||||
// Pointers to material and pawn hash table entries
|
||||
MaterialInfo* mi;
|
||||
|
||||
Reference in New Issue
Block a user