2 // RUN: %libomptarget-compilexx-generic
3 // RUN: env LIBOMPTARGET_INFO=16 \
4 // RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic
6 // UNSUPPORTED: aarch64-unknown-linux-gnu
7 // UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
8 // UNSUPPORTED: x86_64-pc-linux-gnu
9 // UNSUPPORTED: x86_64-pc-linux-gnu-LTO
11 int main(int argc
, char *argv
[]) {
12 constexpr const int block_size
= 256;
13 constexpr const int grid_size
= 4;
14 constexpr const int count
= block_size
* grid_size
;
16 int *data
= new int[count
];
18 #pragma omp target teams distribute parallel for thread_limit(block_size) map(from: data[0:count])
19 for (int i
= 0; i
< count
; ++i
)
22 for (int i
= 0; i
< count
; ++i
)
31 // CHECK: Launching kernel {{.*}} with 4 blocks and 256 threads in SPMD mode