43 omp_set_num_threads(number);
46 "openMP was not enabled at compilation (or " 47 "you asked for 0 threads !)");
53 return omp_get_max_threads();
61 return omp_get_thread_num();
69 return omp_get_num_threads();
77 return omp_get_num_procs();
85 omp_set_nested(((value ==
true) ? 1 : 0));
88 "openMP was not enabled at compilation (and you " 89 "asked for nested parallelism !)");
95 return ((omp_get_nested() == 0) ?
false :
true);
103 omp_set_dynamic(((value ==
true) ? 1 : 0));
106 "openMP was not enabled at compilation (and you " 107 "asked for dynamic adjustment of the number of " 114 return ((omp_get_dynamic() == 0) ?
false :
true);
bool isOMP()
Is OMP active ?
unsigned int getNumberOfLogicalProcessors()
Get the number of logical processors.
unsigned int getNumberOfRunningThreads()
Get the current number of running threads.
unsigned int getThreadNumber()
Get the calling thread id.
bool getDynamicThreadsNumber()
Get the dynamic thread number adjustment status.
void setNestedParallelism(bool value)
Set nested parallelism (false bu default).
unsigned int getMaxNumberOfThreads()
Returns the maximum number of threads at any time.
gum is the global namespace for all aGrUM entities
bool getNestedParallelism()
Get nested parallelism status.
void setDynamicThreadsNumber(bool value)
Set the dynamic threads number (false by default).
void setNumberOfThreads(unsigned int number)
Set the number of threads to be used.
#define GUM_ERROR(type, msg)