xref: /llvm-project/offload/test/api/omp_get_num_procs.c (revision 330d8983d25d08580fc1642fea48b2473f47a9da)
1 // RUN: %libomptarget-compile-run-and-check-generic
2 
3 #include <stdio.h>
4 
5 int omp_get_num_procs(void);
6 
main()7 int main() {
8   int num_procs;
9 #pragma omp target map(from : num_procs)
10   { num_procs = omp_get_num_procs(); }
11 
12   // CHECK: PASS
13   if (num_procs > 0)
14     printf("PASS\n");
15 }
16