[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / openmp / libomptarget / deviceRTLs / nvptx / test / api / get_max_threads.c
blob60254bc7ed2e2f4b369de506a4545a8d24c4f0bf
1 // RUN: %compile-run-and-check
2 #include <omp.h>
3 #include <stdio.h>
5 int main(){
6 int max_threads = -1;
7 int num_threads = -1;
9 #pragma omp target map(tofrom: max_threads)
10 max_threads = omp_get_max_threads();
12 #pragma omp target parallel map(tofrom: num_threads)
14 #pragma omp master
15 num_threads = omp_get_num_threads();
18 // CHECK: Max Threads: 128, Num Threads: 128
19 printf("Max Threads: %d, Num Threads: %d\n", max_threads, num_threads);
21 return 0;