Re-add "Cache line aligned TT"

But this time do not play with pointers, in
particular do not assume that size_t is an
unsigned type of the same width as pointers.

This code should be fully portable.

No functional change.
This commit is contained in:
Marco Costalba
2013-05-01 22:55:23 +02:00
parent e381951a24
commit 481eda4ca0
4 changed files with 10 additions and 8 deletions

View File

@@ -85,7 +85,7 @@ class TranspositionTable {
static const unsigned ClusterSize = 4; // A cluster is 64 Bytes
public:
~TranspositionTable() { delete [] table; }
~TranspositionTable() { free(mem); }
void new_search() { generation++; }
TTEntry* probe(const Key key) const;
@@ -98,6 +98,7 @@ public:
private:
uint32_t hashMask;
TTEntry* table;
void* mem;
uint8_t generation; // Size must be not bigger then TTEntry::generation8
};