X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.cpp;h=08ac30e11a17c4c8b333cdd73093b3db0cf3e649;hp=1772a41931017c2ed1857288ba6a90955deb4b75;hb=94a3608ab9f2334784ac3b111dc79c9eb5e33ba3;hpb=55948623e7b8ad1fc6624cd06733b16d295eecb8 diff --git a/src/thread.cpp b/src/thread.cpp index 1772a419..08ac30e1 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -217,6 +217,13 @@ void ThreadPool::read_uci_options() { assert(requested > 0); + // Value 0 has a special meaning: We determine the optimal minimum split depth + // automatically. Anyhow the minimumSplitDepth should never be under 4 plies. + if (!minimumSplitDepth) + minimumSplitDepth = (requested < 8 ? 4 : 7) * ONE_PLY; + else + minimumSplitDepth = std::max(4 * ONE_PLY, minimumSplitDepth); + while (size() < requested) push_back(new_thread());