1 // RUN: %libomptarget-compile-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(1);
22 if (tid
== 0 && bid
== 0)
24 ompx_sync_block(ompx_seq_cst
);
25 if (tid
== 1 && bid
== 0)
27 ompx_sync_block_acq_rel();
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());