OpenMP.h 325 Bytes
Newer Older
1
2
3
#ifndef AMDIS_OPENMP_H
#define AMDIS_OPENMP_H

4
#ifdef _OPENMP
5

6
#include <omp.h>
7

8
9
const bool amdisHaveOpenMP = true;

10
11
#else

12
13
const bool amdisHaveOpenMP = false;

14
15
16
17
18
19
20
21
22
23
24
25
26
27
inline int omp_get_max_threads() {
  return 1;
}

inline int omp_get_num_threads() {
  return 1;
}

inline int omp_get_thread_num() {
  return 0;
}

#endif

28
#endif