mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Merged with dev
This commit is contained in:
parent
d934b63424
commit
fe3b92870f
90 changed files with 3310 additions and 1748 deletions
|
@ -25,6 +25,8 @@
|
|||
#include <boost/nowide/convert.hpp>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
|
||||
#include <tbb/task_scheduler_init.h>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
static boost::log::trivial::severity_level logSeverity = boost::log::trivial::error;
|
||||
|
@ -83,6 +85,14 @@ void trace(unsigned int level, const char *message)
|
|||
(::boost::log::keywords::severity = severity)) << message;
|
||||
}
|
||||
|
||||
void disable_multi_threading()
|
||||
{
|
||||
// Disable parallelization so the Shiny profiler works
|
||||
static tbb::task_scheduler_init *tbb_init = nullptr;
|
||||
if (tbb_init == nullptr)
|
||||
tbb_init = new tbb::task_scheduler_init(1);
|
||||
}
|
||||
|
||||
static std::string g_var_dir;
|
||||
|
||||
void set_var_dir(const std::string &dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue