24 if (
const char* value = std::getenv(
name.c_str())) {
25 return std::string(value);
33 if (!
GetEnvVar(
"OMP_NUM_THREADS").empty() ||
37 return omp_get_max_threads();
51 return omp_in_parallel();
static CPUInfo & GetInstance()
bool InParallel()
Returns true if in an parallel section.
int EstimateMaxThreads()
Estimate the maximum number of threads to be used in a parallel region.
static std::string GetEnvVar(const std::string &name)
Generic file read and write utility for python interface.