HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)

omp_get_num_procs
#include <omp.h>
int omp_get_num_procs(void);
The omp_get_num_procs function returns the number of processors that are available
to the program at the time the function is called.
omp_in_parallel
#include <omp.h>
int omp_in_parallel(void);
The omp_in_parallel function returns non-zero if it is called within the dynamic extent
of a parallel region executing in parallel; otherwise, it returns 0. This function returns
non-zero from within a region executing in parallel, including nested regions that are
serialized.
omp_set_dynamic
#include <omp.h>
void omp_set_dynamic(int dynamic_threads);
The omp_set_dynamic function enables or disables dynamic adjustment of the number
of threads available for execution of parallel regions. This function has effect only when
called from serial portions of the program. If it is called from a portion of the program
where the omp_in_parallel function returns non-zero, the behavior of the function is
undefined. If dynamic_threads evaluates to non-zero, the number of threads that are
used for executing subsequent parallel regions may be adjusted automatically by the
runtime environment to best utilize system resources. As a consequence, the number of
threads specified by the user is the maximum thread count. The number of threads always
remains fixed over the duration of each parallel region and is reported by the
omp_get_num_threads function. If dynamic_threads evaluates to 0, dynamic
adjustment is disabled. A call to omp_set_dynamic has precedence over the
OMP_DYNAMIC environment variable.
The default for the dynamic adjustment of threads is 0.
omp_get_dynamic
#include <omp.h>
int omp_get_dynamic(void);
The omp_get_dynamic function returns non-zero if dynamic thread adjustment is enabled
and returns 0 otherwise.
omp_set_nested
#include <omp.h>
214 Exception Handling