29 const unsigned int tmp = max_threads <= 0 ? std::numeric_limits<int>::max() : max_threads;
30 const unsigned int num_threads = std::min(tmp, std::thread::hardware_concurrency());
33#ifdef POLYFEM_WITH_TBB
34 thread_limiter = std::make_shared<tbb::global_control>(tbb::global_control::max_allowed_parallelism,
num_threads);