1 // RUN: %compile-run-and-check
6 const int MaxThreads
= 1024;
8 int main(int argc
, char *argv
[]) {
9 int cancellation
= -1, dynamic
= -1, nested
= -1, maxActiveLevels
= -1;
11 #pragma omp target map(cancellation, dynamic, nested, maxActiveLevels)
13 // libomptarget-nvptx doesn't support cancellation.
14 cancellation
= omp_get_cancellation();
16 // No support for dynamic adjustment of the number of threads.
18 dynamic
= omp_get_dynamic();
20 // libomptarget-nvptx doesn't support nested parallelism.
22 nested
= omp_get_nested();
24 omp_set_max_active_levels(42);
25 maxActiveLevels
= omp_get_max_active_levels();
28 // CHECK: cancellation = 0
29 printf("cancellation = %d\n", cancellation
);
31 printf("dynamic = %d\n", dynamic
);
33 printf("nested = %d\n", nested
);
34 // CHECK: maxActiveLevels = 1
35 printf("maxActiveLevels = %d\n", maxActiveLevels
);