And use size_t where appropriate, as suggested on FishCooking.
No functional change.
/// measured in megabytes. Transposition table consists of a power of 2 number
/// of clusters and each cluster consists of TTClusterSize number of TTEntry.
-void TranspositionTable::resize(uint64_t mbSize) {
+void TranspositionTable::resize(size_t mbSize) {
- assert(msb((mbSize * 1024 * 1024) / sizeof(TTCluster)) < 32);
-
- uint32_t newClusterCount = 1 << msb((mbSize * 1024 * 1024) / sizeof(TTCluster));
+ size_t newClusterCount = size_t(1) << msb((mbSize * 1024 * 1024) / sizeof(TTCluster));
if (newClusterCount == clusterCount)
return;
const TTEntry* probe(const Key key) const;
TTEntry* first_entry(const Key key) const;
- void resize(uint64_t mbSize);
+ void resize(size_t mbSize);
void clear();
void store(const Key key, Value v, Bound type, Depth d, Move m, Value statV);
private:
- uint32_t clusterCount;
+ size_t clusterCount;
TTCluster* table;
void* mem;
uint8_t generation; // Size must be not bigger than TTEntry::genBound8
o["Contempt Factor"] << Option(0, -50, 50);
o["Min Split Depth"] << Option(0, 0, 12, on_threads);
o["Threads"] << Option(1, 1, MAX_THREADS, on_threads);
- o["Hash"] << Option(32, 1, 16384, on_hash_size);
+ o["Hash"] << Option(32, 1, 1024 * 1024, on_hash_size);
o["Clear Hash"] << Option(on_clear_hash);
o["Ponder"] << Option(true);
o["MultiPV"] << Option(1, 1, 500);