16 omp_event_handle_t ev;
17#pragma omp task detach(ev)
19 omp_fulfill_event(ev);
21 fprintf(stderr,
"error: root_team_detached(): a != 1\n");
28#pragma omp target nowait
34 fprintf(stderr,
"error: root_team_hidden_helpers(): a != 1\n");
41 omp_event_handle_t *evs =
42 (omp_event_handle_t *)malloc(
sizeof(omp_event_handle_t) * nth1);
43#pragma omp parallel num_threads(nth1)
45 int tid = omp_get_thread_num();
46 omp_event_handle_t e = evs[tid];
47#pragma omp task detach(e)
53 fprintf(stderr,
"error: parallel_detached(): a (%d) != %d\n",
a, nth1);
60#pragma omp parallel num_threads(nth1)
62#pragma omp target nowait
66 fprintf(stderr,
"error: parallel_hidden_helpers(): a (%d) != %d\n",
a,
74 omp_event_handle_t **evs =
75 (omp_event_handle_t **)malloc(
sizeof(omp_event_handle_t *) * nth1);
76#pragma omp parallel num_threads(nth1)
78 int tid = omp_get_thread_num();
79 evs[tid] = (omp_event_handle_t *)malloc(
sizeof(omp_event_handle_t) * nth2);
80#pragma omp parallel num_threads(nth2) shared(tid)
82 int tid2 = omp_get_thread_num();
83 omp_event_handle_t e = evs[tid][tid2];
84#pragma omp task detach(e)
91 if (
a != nth1 * nth2) {
92 fprintf(stderr,
"error: nested_parallel_detached(): a (%d) != %d * %d\n",
a,
100#pragma omp parallel num_threads(nth1)
102#pragma omp parallel num_threads(nth2)
104#pragma omp target nowait
108 if (
a != nth1 * nth2) {
110 "error: nested_parallel_hidden_helpers(): a (%d) != %d * %d\n",
a,
122 for (
i = 0;
i < 10; ++
i)
125 for (
i = 0;
i < 10; ++
i)
128 for (
i = 0;
i < 10; ++
i)
129 for (nth1 = 1; nth1 <= 4; ++nth1)
132 for (
i = 0;
i < 10; ++
i)
133 for (nth1 = 1; nth1 <= 4; ++nth1)
136 for (
i = 0;
i < 10; ++
i)
137 for (nth1 = 1; nth1 <= 4; ++nth1)
138 for (nth2 = 1; nth2 <= 4; ++nth2)
141 for (
i = 0;
i < 10; ++
i)
142 for (nth1 = 1; nth1 <= 4; ++nth1)
143 for (nth2 = 1; nth2 <= 4; ++nth2)
void root_team_hidden_helpers()
void nested_parallel_hidden_helpers(int nth1, int nth2)
void nested_parallel_detached(int nth1, int nth2)
void parallel_detached(int nth1)
void root_team_detached()
void parallel_hidden_helpers(int nth1)
#define omp_set_max_active_levels