| // RUN: %libomptarget-compilexx-run-and-check-generic |
| #pragma omp target teams map(from: X) device(device) thread_limit(2) num_teams(1) |
| int tid = ompx::thread_id_x(); |
| int bid = ompx::block_id_x(); |
| if (tid == 1 && bid == 0) { |
| ompx::sync_block_divergent(3); |
| ompx::sync_block_divergent(); |
| if (tid == 0 && bid == 0) |
| ompx::sync_block(ompx::seq_cst); |
| if (tid == 1 && bid == 0) |
| if (tid == 0 && bid == 0) |
| ompx_sync_block(ompx_release); |
| if (tid == 0 && bid == 0) |
| foo(omp_get_default_device()); |
| foo(omp_get_initial_device()); |