From a9181bab91e4e69fcedad052c98fe9595ec15e10 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 10 Jan 2020 07:17:31 +0100 Subject: [PATCH] src/main.cpp: threads, use std::thread::hardware_concurrency() as default value for n_threads. --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 18b350c..8680fc6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -38,7 +38,7 @@ #define MIN_THREADS 2 // Number of threads to use. -static int n_threads = MIN_THREADS; +static int n_threads = std::thread::hardware_concurrency(); #define search_func thread_search static void thread_search(const strlist_t& words, int n) {