1 // RUN: %compile-run-and-check 2 #include <omp.h> 3 #include <stdio.h> 4 main()5int main(){ 6 int max_threads = -1; 7 int num_threads = -1; 8 9 #pragma omp target map(tofrom: max_threads) 10 max_threads = omp_get_max_threads(); 11 12 #pragma omp target parallel map(tofrom: num_threads) 13 { 14 #pragma omp master 15 num_threads = omp_get_num_threads(); 16 } 17 18 // CHECK: Max Threads: 128, Num Threads: 128 19 printf("Max Threads: %d, Num Threads: %d\n", max_threads, num_threads); 20 21 return 0; 22 } 23