omp_set_nested (GNU libgomp)

#### 3.1.9 `omp_set_nested` – Enable/disable nested parallel regions ¶

Description:

  Enable or disable nested parallel regions, i.e., whether team members are allowed to create new teams. The function takes the language-specific equivalent of `true` and `false`, where `true` enables dynamic adjustment of team sizes and `false` disables it.

  Enabling nested parallel regions also sets the maximum number of active nested regions to the maximum supported. Disabling nested parallel regions sets the maximum number of active nested regions to one.

  Note that the `omp_set_nested` API routine was deprecated in the OpenMP specification 5.0 in favor of `omp_set_max_active_levels`.

C/C++:

  Prototype: | `void omp_set_nested(int nested);`

Fortran:

  Interface: | `subroutine omp_set_nested(nested)`
  | `logical, intent(in) :: nested`

See also:

  `omp_get_nested` – Nested parallel regions, `omp_set_max_active_levels` – Limits the number of active parallel regions, `OMP_MAX_ACTIVE_LEVELS` – Set the maximum number of nested parallel regions, `OMP_NESTED` – Nested parallel regions

Reference:

  OpenMP specification v4.5, Section 3.2.10.