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:
Marco Costalba
2012-12-01 13:51:14 +01:00
parent 4502917665
commit 4e5d834e8e
3 changed files with 40 additions and 12 deletions

View File

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