1 #ifndef OMP_PROXY_H_
2 #define OMP_PROXY_H_
3 
4 #include "macros.h"
5 
6 // IWYU pragma: begin_exports
7 #ifdef HAVE_OPENMP
8 #include <omp.h>
9 #else
10 #ifdef  __GNUC__
11 #pragma GCC diagnostic ignored "-Wunknown-pragmas"
12 #endif
13 /* minimal stub */
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
omp_get_max_threads()17 static inline int omp_get_max_threads()
18 {
19   return 1;
20 }
21 
omp_get_num_threads()22 static inline int omp_get_num_threads()
23 {
24   return 1;
25 }
26 
omp_set_num_threads(int n MAYBE_UNUSED)27 static inline void omp_set_num_threads(int n MAYBE_UNUSED)
28 {
29 }
30 
omp_set_nested(int n MAYBE_UNUSED)31 static inline void omp_set_nested(int n MAYBE_UNUSED)
32 {
33 }
34 
omp_get_thread_num()35 static inline int omp_get_thread_num()
36 {
37   return 0;
38 }
39 #ifdef __cplusplus
40 }
41 #endif
42 #endif /* HAVE_OPENMP */
43 // IWYU pragma: end_exports
44 
45 
46 #endif	/* OMP_PROXY_H_ */
47