1 // RUN: %libomptarget-compile-generic
2 // RUN: %libomptarget-compileopt-generic
15 #pragma omp target teams distribute num_teams(nxyz) \
16 thread_limit(ng *(cmom - 1)) map(tofrom : aa)
17 for (int gid
= 0; gid
< nxyz
; gid
++) {
18 #pragma omp parallel for collapse(2)
19 for (unsigned int g
= 0; g
< ng
; g
++) {
20 for (unsigned int l
= 0; l
< cmom
- 1; l
++) {
22 #pragma omp parallel for reduction(+ : a)
23 for (int i
= 0; i
< N
; i
++) {
31 long exp
= (long)ng
* (cmom
- 1) * nxyz
* (N
* (N
- 1) / 2);
32 printf("The result is = %ld exp:%ld!\n", aa
, exp
);
34 printf("Failed %ld\n", aa
);