Expose EvalInfo struct to search

Allow to use EvalInfo struct, populated by
evaluation(), in search.

In particular we allocate Eval::Info on the stack
and pass a pointer to this to evaluate().

Also add to Search::Stack a pointer to Eval::Info,
this allows to reference eval info of previous/next
nodes.

WARNING: Eval::Info is NOT initialized and is populated
by evaluate(), only if the latter is called, and this
does not happen in all the code paths, so care should be
taken when accessing this struct.

No functional change.
This commit is contained in:
Marco Costalba
2013-04-25 12:43:55 +02:00
parent 79bcb2ca54
commit d810441b35
4 changed files with 76 additions and 69 deletions

View File

@@ -25,6 +25,7 @@
#include <stack>
#include <vector>
#include "evaluate.h"
#include "misc.h"
#include "position.h"
#include "types.h"
@@ -48,6 +49,7 @@ struct Stack {
Value evalMargin;
int skipNullMove;
int futilityMoveCount;
Eval::Info* ei;
};