mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 10:06:26 +08:00
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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user