1 // RUN: %libomptarget-compile-generic
2 // RUN: env LIBOMPTARGET_INFO=63 %libomptarget-run-generic 2>&1 | \
3 // RUN: %fcheck-generic
12 int main(int argc
, char *argv
[]) {
13 const int num_blocks
= 64;
14 const int block_size
= 64;
15 const int N
= num_blocks
* block_size
;
16 int *data
= (int *)malloc(N
* sizeof(int));
18 // CHECK: "PluginInterface" device 0 info: Launching kernel __omp_offloading_{{.*}} with [64,1,1] blocks and [64,1,1] threads in SPMD mode
20 #pragma omp target teams ompx_bare num_teams(num_blocks) thread_limit(block_size) map(from: data[0:N])
22 int bid
= ompx_block_id_x();
23 int bdim
= ompx_block_dim_x();
24 int tid
= ompx_thread_id_x();
25 int idx
= bid
* bdim
+ tid
;
29 for (int i
= 0; i
< N
; ++i
)