From d72c48500b5c3eaf3ab7351b5b4a3feb3d01a62f Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Fri, 25 Nov 2011 21:54:19 +0100 Subject: [PATCH] moved openmp replacement header --- openmp.h => Util/OpenMPReplacement.h | 4 ---- createHierarchy.cpp | 7 ++++++- extractor.cpp | 7 ++++++- routed.cpp | 6 +++++- 4 files changed, 17 insertions(+), 7 deletions(-) rename openmp.h => Util/OpenMPReplacement.h (95%) diff --git a/openmp.h b/Util/OpenMPReplacement.h similarity index 95% rename from openmp.h rename to Util/OpenMPReplacement.h index 18cddc928..c92324676 100644 --- a/openmp.h +++ b/Util/OpenMPReplacement.h @@ -19,11 +19,7 @@ or see http://www.gnu.org/licenses/agpl.txt. */ -#ifdef _OPENMP -#include -#else const int omp_get_num_procs() { return 1; } const int omp_get_max_threads() { return 1; } const int omp_get_thread_num() { return 0; } const int omp_set_num_threads(int i) {} -#endif \ No newline at end of file diff --git a/createHierarchy.cpp b/createHierarchy.cpp index e217dba59..f9c68578d 100644 --- a/createHierarchy.cpp +++ b/createHierarchy.cpp @@ -36,7 +36,12 @@ or see http://www.gnu.org/licenses/agpl.txt. #include #include -#include "openmp.h" +#ifdef _OPENMP +#include +#else +#include "Util/OpenMPReplacement.h" +#endif + #include "typedefs.h" #include "Contractor/Contractor.h" #include "Contractor/ContractionCleanup.h" diff --git a/extractor.cpp b/extractor.cpp index 104fb8cd6..0f9e398af 100644 --- a/extractor.cpp +++ b/extractor.cpp @@ -43,7 +43,12 @@ or see http://www.gnu.org/licenses/agpl.txt. #include #include -#include "openmp.h" +#ifdef _OPENMP +#include +#else +#include "Util/OpenMPReplacement.h" +#endif + #include "typedefs.h" #include "DataStructures/InputReaderFactory.h" #include "DataStructures/ExtractorCallBacks.h" diff --git a/routed.cpp b/routed.cpp index 4cbd902ab..80f0b4ac4 100644 --- a/routed.cpp +++ b/routed.cpp @@ -24,7 +24,11 @@ or see http://www.gnu.org/licenses/agpl.txt. #include #include -#include "openmp.h" +#ifdef _OPENMP +#include +#else +#include "Util/OpenMPReplacement.h" +#endif #include "Server/ServerConfiguration.h" #include "Server/ServerFactory.h"