23#ifdef DEAL_II_WITH_TBB
24# ifdef DEAL_II_TBB_WITH_ONEAPI
25# include <tbb/global_control.h>
27# include <tbb/task_scheduler_init.h>
42 const unsigned int n_cores = std::thread::hardware_concurrency();
55 if (
const char *penv = std::getenv(
"DEAL_II_NUM_THREADS"))
68 "When specifying the <DEAL_II_NUM_THREADS> environment "
69 "variable, it needs to be something that can be interpreted "
70 "as an integer. The text you have in the environment "
77 "When specifying the <DEAL_II_NUM_THREADS> environment "
78 "variable, it needs to be a positive number."));
92#ifdef DEAL_II_WITH_TBB
93# ifdef DEAL_II_TBB_WITH_ONEAPI
94 tbb::global_control(tbb::global_control::max_allowed_parallelism,
98 static tbb::task_scheduler_init dummy(tbb::task_scheduler_init::deferred);
99 if (dummy.is_active())
137 static bool done =
false;
static unsigned int n_max_threads
static bool is_running_single_threaded()
static void initialize_multithreading()
static unsigned int n_cores()
static unsigned int n_threads()
static void set_thread_limit(const unsigned int max_threads=numbers::invalid_unsigned_int)
static std::size_t memory_consumption()
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
int string_to_int(const std::string &s)
static const unsigned int invalid_unsigned_int
::VectorizedArray< Number, width > min(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)