![]() |
GemaCoreLib
The GeMA Core library
|
Declaration of helper functions for using OpenMP that translate into "empty" statements if compiled without OpenMP support. More...
Go to the source code of this file.
Macros | |
#define | GM_OMP_ASSERT_NO_DYNAMIC ((void)0) |
Functions | |
void | GmOmpInit (int maxThreads) |
Initializes OpenMP to use the given maximum number of threads. It also disables dynamic scheduling. | |
int | GmOmpAdjustNumThreads (int nt) |
Adjusts the given number of threads. If nt <= 0 or if nt > maximum number of omp threads, returns the maximum number of threads. Otherwise returns nt. More... | |
int | GmOmpThreadNum () |
Returns the current Open Mp thread number (omp_get_thread_num()). More... | |
Declaration of helper functions for using OpenMP that translate into "empty" statements if compiled without OpenMP support.
|
inline |
Adjusts the given number of threads. If nt <= 0 or if nt > maximum number of omp threads, returns the maximum number of threads. Otherwise returns nt.
If compiling without OpenMP support, always returns 1.
|
inline |
Returns the current Open Mp thread number (omp_get_thread_num()).
If compiling without OpenMP support, always returns 0.