45 omp_set_num_threads(number);
48 "openMP was not enabled at compilation (or " 49 "you asked for 0 threads !)");
55 return omp_get_max_threads();
63 return omp_get_thread_num();
71 return omp_get_num_threads();
79 return omp_get_num_procs();
87 omp_set_nested(((value ==
true) ? 1 : 0));
90 "openMP was not enabled at compilation (and you " 91 "asked for nested parallelism !)");
97 return ((omp_get_nested() == 0) ?
false :
true);
105 omp_set_dynamic(((value ==
true) ? 1 : 0));
108 "openMP was not enabled at compilation (and you " 109 "asked for dynamic adjustment of the number of " 116 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.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
bool getNestedParallelism()
Get nested parallelism status.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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)