HOME
| OPENMP API Specification: Version 5.1 November 2020

3.3.1  omp_get_proc_bind

Summary The omp_get_proc_bind routine returns the thread affinity policy to be used for the subsequent nested parallel regions that do not specify a proc_bind clause.

Format

SVG-Viewer needed.

 

 
omp_proc_bind_t omp_get_proc_bind(void);  

SVG-Viewer needed.

SVG-Viewer needed.

 

 
integer (kind=omp_proc_bind_kind) function omp_get_proc_bind()  

SVG-Viewer needed.

Constraints on Arguments The value returned by this routine must be one of the valid affinity policy kinds. The C/C++ header file (omp.h) and the Fortran include file (omp_lib.h) and/or Fortran module file (omp_lib) define the valid constants. The valid constants must include the following:

SVG-Viewer needed.

 

 
typedef enum omp_proc_bind_t { 
  omp_proc_bind_false = 0, 
  omp_proc_bind_true = 1, 
  omp_proc_bind_primary = 2, 
  omp_proc_bind_master = omp_proc_bind_primary, // (deprecated) 
  omp_proc_bind_close = 3, 
  omp_proc_bind_spread = 4 
} omp_proc_bind_t;  

SVG-Viewer needed.

SVG-Viewer needed.

 

 
integer (kind=omp_proc_bind_kind), & 
                parameter :: omp_proc_bind_false = 0 
integer (kind=omp_proc_bind_kind), & 
                parameter :: omp_proc_bind_true = 1 
integer (kind=omp_proc_bind_kind), & 
                parameter :: omp_proc_bind_primary = 2 
integer (kind=omp_proc_bind_kind), & 
                parameter :: omp_proc_bind_master = & 
                omp_proc_bind_primary         !  (deprecated) 
integer (kind=omp_proc_bind_kind), & 
                parameter :: omp_proc_bind_close = 3 
integer (kind=omp_proc_bind_kind), & 
                parameter :: omp_proc_bind_spread = 4  

SVG-Viewer needed.

Binding The binding task set for an omp_get_proc_bind region is the generating task.

Effect The effect of this routine is to return the value of the first element of the bind-var ICV of the current task. See Section 2.6.2 for the rules that govern the thread affinity policy.

Cross References