23 #ifdef DEAL_II_WITH_TBB
24 # include <tbb/task_scheduler_init.h>
38 const unsigned int n_cores = std::thread::hardware_concurrency();
51 if (
const char *penv = std::getenv(
"DEAL_II_NUM_THREADS"))
64 "When specifying the <DEAL_II_NUM_THREADS> environment "
65 "variable, it needs to be something that can be interpreted "
66 "as an integer. The text you have in the environment "
73 "When specifying the <DEAL_II_NUM_THREADS> environment "
74 "variable, it needs to be a positive number."));
88 #ifdef DEAL_II_WITH_TBB
90 static tbb::task_scheduler_init dummy(tbb::task_scheduler_init::deferred);
91 if (dummy.is_active())
128 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
static ::ExceptionBase & ExcInternalError()
#define Assert(cond, exc)
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