13 omp_set_max_active_levels (1);
14 if (omp_get_max_active_levels () != 1)
16 #pragma omp parallel num_threads(2) reduction(|:e)
17 if (!omp_in_parallel ()
18 || omp_get_num_threads () != 2)
21 #pragma omp parallel num_threads(2) reduction(|:e)
22 if (!omp_in_parallel ()
23 || omp_get_num_threads () != 1)
27 omp_set_max_active_levels (0);
28 if (omp_get_max_active_levels () != 0)
30 #pragma omp parallel num_threads(2) reduction(|:e)
31 if (omp_in_parallel ()
32 || omp_get_num_threads () != 1)
35 #pragma omp parallel num_threads(2) reduction(|:e)
36 if (omp_in_parallel ()
37 || omp_get_num_threads () != 1)
41 omp_set_max_active_levels (2);
42 if (omp_get_max_active_levels () != 2)
44 #pragma omp parallel num_threads(2) reduction(|:e)
45 if (!omp_in_parallel ()
46 || omp_get_num_threads () != 2)
49 #pragma omp parallel num_threads(2) reduction(|:e)
50 if (!omp_in_parallel ()
51 || omp_get_num_threads () != 2)
54 #pragma omp parallel num_threads(2) reduction(|:e)
55 if (!omp_in_parallel ()
56 || omp_get_num_threads () != 1)