1 // RUN: %libomptarget-compile-generic && env LIBOMPTARGET_DEBUG=1 %libomptarget-run-generic 2>&1 | %fcheck-generic -allow-empty -check-prefix=DEBUG
2 // REQUIRES: libomptarget-debug
5 Test for looptripcount being popped from runtime stack.
15 printf("#pragma omp target teams distribute parallel for thread_limit(4)\n");
16 #pragma omp target teams distribute parallel for thread_limit(4)
17 for (int j
= 0; j
< N
; j
++) {
18 num_threads
[j
] = omp_get_num_threads();
19 num_teams
[j
] = omp_get_num_teams();
21 printf("num_threads %d num_teams %d\n", num_threads
[0], num_teams
[0]);
22 // DEBUG: loop trip count is 128
23 printf("#pragma omp target teams distribute parallel for\n");
24 #pragma omp target teams distribute parallel for
25 for (int j
= 0; j
< N
; j
++) {
26 num_threads
[j
] = omp_get_num_threads();
27 num_teams
[j
] = omp_get_num_teams();
29 printf("num_threads %d num_teams %d\n", num_threads
[0], num_teams
[0]);
30 // DEBUG: loop trip count is 128