From 968c3de8e0acd46a8b55225dda1ed607ce24f380 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 9 Jan 2010 16:45:31 +0100 Subject: [PATCH] Fix threads count setting Was broken after "Optimal tune for 8 cores" patch. Signed-off-by: Marco Costalba --- src/ucioption.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 9bcd960b..9f1447e1 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -198,10 +198,14 @@ void init_uci_options() { // Set optimal value for parameter "Minimum Split Depth" // according to number of available cores. + assert(options.find("Threads") != options.end()); assert(options.find("Minimum Split Depth") != options.end()); + Option& thr = options["Threads"]; Option& msd = options["Minimum Split Depth"]; + thr.defaultValue = thr.currentValue = stringify(cpu_count()); + if (cpu_count() >= 8) msd.defaultValue = msd.currentValue = stringify(7); } -- 2.39.2