Change TT interface to ask directly for a position key

Instead of a position because the key is all that we
need.

Interface is more clear and also very very little bit faster.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-05-02 14:57:52 +02:00
parent fdb2242d34
commit aabd526f7c
3 changed files with 25 additions and 25 deletions

View File

@@ -83,14 +83,14 @@ public:
~TranspositionTable();
void set_size(unsigned mbSize);
void clear();
void store(const Position& pos, Value v, ValueType type, Depth d, Move m);
TTEntry* retrieve(const Position& pos) const;
void store(const Key posKey, Value v, ValueType type, Depth d, Move m);
TTEntry* retrieve(const Key posKey) const;
void new_search();
void insert_pv(const Position& pos, Move pv[]);
int full() const;
private:
inline TTEntry* first_entry(const Position& pos) const;
inline TTEntry* first_entry(const Key posKey) const;
unsigned size, writes;
TTEntry* entries;