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:
Marco Costalba
2009-11-07 11:15:55 +01:00
parent 2f5ee9e4e8
commit 06f06a9be8
3 changed files with 85 additions and 67 deletions

View File

@@ -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;