X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftt.cpp;fp=src%2Ftt.cpp;h=0a3c54a1e2318046abe8dbc4d9859dc1f0b78a6d;hp=4e06bed93451d867fdc49e4d6c11fc26b0ad27ef;hb=383b12e1a5cc03a122e9a071eebde87eac85b116;hpb=d940e59dad51e78d5146bb21c8f792379df64816 diff --git a/src/tt.cpp b/src/tt.cpp index 4e06bed9..0a3c54a1 100644 --- a/src/tt.cpp +++ b/src/tt.cpp @@ -94,8 +94,8 @@ void TranspositionTable::clear() { WinProcGroup::bindThisThread(idx); // Each thread will zero its part of the hash table - const size_t stride = clusterCount / Options["Threads"], - start = stride * idx, + const size_t stride = size_t(clusterCount / Options["Threads"]), + start = size_t(stride * idx), len = idx != Options["Threads"] - 1 ? stride : clusterCount - start; @@ -103,7 +103,7 @@ void TranspositionTable::clear() { }); } - for (std::thread& th: threads) + for (std::thread& th : threads) th.join(); }