1 // RUN: %libomptarget-compilexx-run-and-check-generic
8 int main(int argc
, char *argv
[]) {
9 constexpr const int num_threads
= 64, N
= 128;
10 int array
[num_threads
] = {0};
12 #pragma omp parallel for
13 for (int i
= 0; i
< num_threads
; ++i
) {
16 for (int j
= 0; j
< N
; ++j
) {
20 #pragma omp target teams distribute parallel for map(tofrom : tmp)
21 for (int j
= 0; j
< N
; ++j
) {
25 for (int j
= 0; j
< N
; ++j
) {
31 for (int i
= 0; i
< num_threads
; ++i
) {
32 const int ref
= (0 + N
- 1) * N
/ 2 + i
* N
;
33 assert(array
[i
] == ref
);
36 std::cout
<< "PASS\n";