diff --git a/source/nnue.h b/source/nnue.h index 5fa6b9f..3e977af 100644 --- a/source/nnue.h +++ b/source/nnue.h @@ -8,7 +8,7 @@ class Board; #ifdef __AVX512F__ -constexpr size_t ALIGNMENT = 64; +constexpr usize ALIGNMENT = 64; #else constexpr size_t ALIGNMENT = 32; #endif diff --git a/source/tt.cpp b/source/tt.cpp index deed40d..6f6b638 100644 --- a/source/tt.cpp +++ b/source/tt.cpp @@ -3,7 +3,7 @@ SearchResults TTable::ReadEntry(U64 &hashKey, int depth, int alpha, int beta) { TTEntry *current = &table[hashKey % table.size()]; - if (current->hashKey == static_cast(hashKey)) { + if (current->hashKey == hashKey) { if (current->depth >= depth) { if (current->nodeType == PV){ return {current->score, current->bestMove}; @@ -22,7 +22,7 @@ SearchResults TTable::ReadEntry(U64 &hashKey, int depth, int alpha, int beta) { void TTable::WriteEntry(U64 &hashKey, int depth, int score, int nodeType, Move bestMove) { TTEntry *current = &table[hashKey % table.size()]; - current->hashKey = static_cast(hashKey); + current->hashKey = hashKey; current->nodeType = nodeType; current->score = score; current->depth = depth; diff --git a/source/tt.h b/source/tt.h index 19cc03a..088faaf 100644 --- a/source/tt.h +++ b/source/tt.h @@ -21,13 +21,13 @@ public: class TTEntry { public: - uint16_t hashKey = 0; + U64 hashKey = 0; int depth = 0; int score = 0; int nodeType = 0; Move bestMove = Move(); - operator uint16_t() { + operator U64() { return hashKey; } };