mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Add eval cache infrastructure
With this patch series we want to introduce a per-thread evaluation cache to store node evaluation and do not rely anymore on the TT table for this. This patch just introduces the infrastructure. No functional change.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#if !defined(EVALUATE_H_INCLUDED)
|
||||
#define EVALUATE_H_INCLUDED
|
||||
|
||||
#include "misc.h"
|
||||
#include "types.h"
|
||||
|
||||
class Position;
|
||||
@@ -30,6 +31,16 @@ extern void init();
|
||||
extern Value evaluate(const Position& pos, Value& margin);
|
||||
extern std::string trace(const Position& pos);
|
||||
|
||||
const int TableSize = 262144;
|
||||
|
||||
struct Entry {
|
||||
Key key;
|
||||
Value value;
|
||||
int16_t margins[2];
|
||||
};
|
||||
|
||||
struct Table : HashTable<Entry, TableSize> {};
|
||||
|
||||
}
|
||||
|
||||
#endif // !defined(EVALUATE_H_INCLUDED)
|
||||
|
||||
Reference in New Issue
Block a user