1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
8 //                    Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
9 //
10 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
11 //////////////////////////////////////////////////////////////////////////////////////
12 
13 
14 
15 
16 
17 
18 #ifndef FORMIC_OHMMS_OPENMP_H
19 #define FORMIC_OHMMS_OPENMP_H
20 
21 #ifdef HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24 
25 #if defined(ENABLE_OPENMP)
26 #include <omp.h>
27 #else
28 typedef int omp_int_t;
omp_get_thread_num()29 inline omp_int_t omp_get_thread_num()
30 {
31   return 0;
32 }
omp_get_max_threads()33 inline omp_int_t omp_get_max_threads()
34 {
35   return 1;
36 }
omp_get_num_threads()37 inline omp_int_t omp_get_num_threads()
38 {
39   return 1;
40 }
41 #endif
42 #endif // FORMIC_OHMMS_OPENMP_H
43