X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftt.cpp;h=716d13e0695b9c108ba142879c365f573e027a73;hp=98d593658689db431e735eb2a9484983399bdd8d;hb=a8e903c33a676decfcf5c721b6b4bfdb4102e5c0;hpb=33b2f6398c419e0c906d58314ada408b460e635c diff --git a/src/tt.cpp b/src/tt.cpp index 98d59365..716d13e0 100644 --- a/src/tt.cpp +++ b/src/tt.cpp @@ -2,7 +2,7 @@ Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad - Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad + Copyright (C) 2015-2019 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -84,10 +84,10 @@ void TranspositionTable::clear() { for (size_t idx = 0; idx < Options["Threads"]; idx++) { - threads.push_back(std::thread([this, idx]() { + threads.emplace_back([this, idx]() { // Thread binding gives faster search on systems with a first-touch policy - if (Options["Threads"] >= 8) + if (Options["Threads"] > 8) WinProcGroup::bindThisThread(idx); // Each thread will zero its part of the hash table @@ -97,7 +97,7 @@ void TranspositionTable::clear() { stride : clusterCount - start; std::memset(&table[start], 0, len * sizeof(Cluster)); - })); + }); } for (std::thread& th: threads)