mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
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:
6
src/tt.h
6
src/tt.h
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user