134 #pragma omp single nowait
139 int t = omp_get_thread_num();
140 #pragma omp task depend(in: i1, i2)
143 #pragma omp atomic capture
145 th = omp_get_thread_num();
146 printf(
"task 0_%d, th %d, checker %d\n", t, th, lcheck);
147 if (lcheck > 2 || lcheck < 1) {
149 printf(
"Error1, checker %d, not 1 or 2\n", lcheck);
152 #pragma omp atomic read
154 if (lcheck > 2 || lcheck < 1) {
157 printf(
"Error2, checker %d, not 1 or 2\n", lcheck);
162 #pragma omp task depend(in: i1, i2)
165 #pragma omp atomic capture
167 th = omp_get_thread_num();
168 printf(
"task 1_%d, th %d, checker %d\n", t, th, lcheck);
169 if (lcheck > 2 || lcheck < 1) {
171 printf(
"Error3, checker %d, not 1 or 2\n", lcheck);
174 #pragma omp atomic read
176 if (lcheck > 2 || lcheck < 1) {
178 printf(
"Error4, checker %d, not 1 or 2\n", lcheck);
186 sdep[0].
addr = (size_t)&i1;
189 sdep[1].
addr = (size_t)&i2;
197 sdep[0].
addr = (size_t)&i1;
206 #pragma omp task depend(in: i1, i2)
209 #pragma omp atomic capture
211 th = omp_get_thread_num();
212 printf(
"task 4_%d, th %d, checker %d\n", t, th, lcheck);
213 if (lcheck > 2 || lcheck < 1) {
215 printf(
"Error5, checker %d, not 1 or 2\n", lcheck);
218 #pragma omp atomic read
220 if (lcheck > 2 || lcheck < 1) {
222 printf(
"Error6, checker %d, not 1 or 2\n", lcheck);
227 #pragma omp task depend(in: i1, i2)
230 #pragma omp atomic capture
232 th = omp_get_thread_num();
233 printf(
"task 5_%d, th %d, checker %d\n", t, th, lcheck);
234 if (lcheck > 2 || lcheck < 1) {
236 printf(
"Error7, checker %d, not 1 or 2\n", lcheck);
239 #pragma omp atomic read
241 if (lcheck > 2 || lcheck < 1) {
243 printf(
"Error8, checker %d, not 1 or 2\n", lcheck);
251 sdep[0].
addr = (size_t)(-1);
262 sdep[1].
addr = (size_t)&i3;
268 #pragma omp task depend(in: i3)
271 #pragma omp atomic capture
273 th = omp_get_thread_num();
274 printf(
"task 8_%d, th %d, checker %d\n", t, th, lcheck);
277 printf(
"Error9, checker %d, != 1\n", lcheck);
280 #pragma omp atomic read
284 printf(
"Error10, checker %d, != 1\n", lcheck);
295 printf(
"failed, err = %d, checker = %d\n",
err,
checker);
int __kmpc_omp_task_with_deps(id *loc, int gtid, task_t *task, int ndeps, dep *dep_lst, int nd_noalias, dep *noalias_lst)
task_t * __kmpc_omp_task_alloc(id *loc, int gtid, int flags, size_t sz, size_t shar, entry_t rtn)