1 // RUN: %libomptarget-compilexx-run-and-check-generic
10 #pragma omp target teams map(from: X) device(device) thread_limit(2) num_teams(1)
14 int tid
= ompx::thread_id_x();
15 int bid
= ompx::block_id_x();
16 if (tid
== 1 && bid
== 0) {
18 ompx::sync_block_divergent(3);
20 ompx::sync_block_divergent();
22 if (tid
== 0 && bid
== 0)
24 ompx::sync_block(ompx::seq_cst
);
25 if (tid
== 1 && bid
== 0)
28 if (tid
== 0 && bid
== 0)
30 ompx_sync_block(ompx_release
);
31 if (tid
== 0 && bid
== 0)
40 foo(omp_get_default_device());
41 foo(omp_get_initial_device());