Compile fixes if OpenMP is not available

This commit is contained in:
Dennis Luxen 2011-11-03 10:53:40 -05:00
parent 5274af7730
commit 3fcabb642e
4 changed files with 13 additions and 0 deletions

View File

@ -35,7 +35,9 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include <set>
#include <stack>
#include <limits>
#ifdef _OPEMP
#include <omp.h>
#endif
class Contractor {

View File

@ -28,7 +28,9 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include <limits>
#include <vector>
#include <stxxl.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#ifdef _WIN32
#include <math.h>

View File

@ -38,6 +38,11 @@ or see http://www.gnu.org/licenses/agpl.txt.
#ifdef _OPENMP
#include <omp.h>
#else
int omp_get_num_procs() { return 1; }
int omp_get_max_threads() { return 1; }
int omp_get_thread_num() { return 0; }
int omp_set_num_threads(int i) {}
#endif
#include "typedefs.h"

View File

@ -23,6 +23,10 @@ or see http://www.gnu.org/licenses/agpl.txt.
#ifdef _OPENMP
#include <omp.h>
#else
int omp_get_num_procs() { return 1; }
int omp_get_max_threads() { return 1; }
int omp_get_thread_num() { return 0; }
#endif
#include <boost/thread.hpp>