From 9fbd135f14ce6769786226f96f99ec9c30cfd00d Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 26 Nov 2016 13:46:19 +0100 Subject: [PATCH] Automatically detect the number of cores and use that as a default for threads number --- xs/src/libslic3r/PrintConfig.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 59dcea879..5e1732a0f 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1,4 +1,5 @@ #include "PrintConfig.hpp" +#include namespace Slic3r { @@ -1291,7 +1292,7 @@ PrintConfigDef::PrintConfigDef() def->readonly = true; def->min = 1; def->max = 16; - def->default_value = new ConfigOptionInt(2); + def->default_value = new ConfigOptionInt(boost::thread::hardware_concurrency()); def = this->add("toolchange_gcode", coString); def->label = "Tool change G-code";