1 // RUN: %libomptarget-compilexx-run-and-check-generic
11 int main(int argc
, char *argv
[]) {
12 const int num_blocks
= 1;
13 const int block_size
= 256;
14 const int N
= num_blocks
* block_size
;
15 int *res
= (int *)malloc(N
* sizeof(int));
17 #pragma omp target teams ompx_bare num_teams(num_blocks) thread_limit(block_size) \
20 int tid
= ompx_thread_id_x();
21 uint64_t mask
= ompx_ballot_sync(~0LU, tid
& 0x1);
22 #if defined __AMDGCN_WAVEFRONT_SIZE && __AMDGCN_WAVEFRONT_SIZE == 64
23 res
[tid
] = mask
== 0xaaaaaaaaaaaaaaaa;
25 res
[tid
] = mask
== 0xaaaaaaaa;
29 for (int i
= 0; i
< N
; ++i
)