fix compilation on mac; openmp issues and an unneeded typename

This commit is contained in:
Emil Tin 2011-11-26 16:42:15 +01:00
parent f10bf842c6
commit f511af0f0c
10 changed files with 21 additions and 38 deletions

2
.gitignore vendored
View File

@ -28,7 +28,7 @@
# OS generated files # # OS generated files #
###################### ######################
.DS_Store? .DS_Store
ehthumbs.db ehthumbs.db
Icon? Icon?
Thumbs.db Thumbs.db

View File

@ -31,10 +31,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
#endif #endif
#include "Contractor.h" #include "Contractor.h"
#ifdef _OPENMP
#include <omp.h>
#endif
class ContractionCleanup { class ContractionCleanup {
private: private:

View File

@ -30,15 +30,13 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include "../DataStructures/DynamicGraph.h" #include "../DataStructures/DynamicGraph.h"
#include "../DataStructures/Percent.h" #include "../DataStructures/Percent.h"
#include "../DataStructures/BinaryHeap.h" #include "../DataStructures/BinaryHeap.h"
#include "../Util/OpenMPReplacement.h"
#include <ctime> #include <ctime>
#include <vector> #include <vector>
#include <queue> #include <queue>
#include <set> #include <set>
#include <stack> #include <stack>
#include <limits> #include <limits>
#ifdef _OPEMP
#include <omp.h>
#endif
class Contractor { class Contractor {

View File

@ -25,6 +25,7 @@
#endif #endif
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include "../Util/OpenMPReplacement.h"
#include "EdgeBasedGraphFactory.h" #include "EdgeBasedGraphFactory.h"
template<> template<>
@ -39,7 +40,7 @@ EdgeBasedGraphFactory::EdgeBasedGraphFactory(int nodes, std::vector<NodeBasedEdg
std::vector< _NodeBasedEdge > edges; std::vector< _NodeBasedEdge > edges;
edges.reserve( 2 * inputEdges.size() ); edges.reserve( 2 * inputEdges.size() );
for ( typename std::vector< NodeBasedEdge >::const_iterator i = inputEdges.begin(), e = inputEdges.end(); i != e; ++i ) { for ( std::vector< NodeBasedEdge >::const_iterator i = inputEdges.begin(), e = inputEdges.end(); i != e; ++i ) {
_NodeBasedEdge edge; _NodeBasedEdge edge;
edge.source = i->source(); edge.source = i->source();
edge.target = i->target(); edge.target = i->target();

View File

@ -22,9 +22,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
#define PERCENT_H #define PERCENT_H
#include <iostream> #include <iostream>
#ifdef _OPENMP
#include <omp.h>
#endif
class Percent class Percent
{ {

View File

@ -27,10 +27,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include <cstdlib> #include <cstdlib>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "Server.h" #include "Server.h"
#include "ServerConfiguration.h" #include "ServerConfiguration.h"

View File

@ -19,7 +19,16 @@ or see http://www.gnu.org/licenses/agpl.txt.
*/ */
const int omp_get_num_procs() { return 1; } #ifndef _OPENMPREPLACEMENTY_H
const int omp_get_max_threads() { return 1; } #define _OPENMPREPLACEMENTY_H
const int omp_get_thread_num() { return 0; }
const int omp_set_num_threads(int i) {} #ifdef _OPENMP
#include <omp.h>
#else
inline const int omp_get_num_procs() { return 1; }
inline const int omp_get_max_threads() { return 1; }
inline const int omp_get_thread_num() { return 0; }
inline const int omp_set_num_threads(int i) {}
#endif
#endif

View File

@ -36,12 +36,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include <string> #include <string>
#include <vector> #include <vector>
#ifdef _OPENMP
#include <omp.h>
#else
#include "Util/OpenMPReplacement.h" #include "Util/OpenMPReplacement.h"
#endif
#include "typedefs.h" #include "typedefs.h"
#include "Contractor/Contractor.h" #include "Contractor/Contractor.h"
#include "Contractor/ContractionCleanup.h" #include "Contractor/ContractionCleanup.h"
@ -52,6 +47,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include "Util/BaseConfiguration.h" #include "Util/BaseConfiguration.h"
#include "Util/InputFileUtil.h" #include "Util/InputFileUtil.h"
#include "Util/GraphLoader.h" #include "Util/GraphLoader.h"
#include "Util/OpenMPReplacement.h"
using namespace std; using namespace std;

View File

@ -43,12 +43,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include <unistd.h> #include <unistd.h>
#include <stxxl.h> #include <stxxl.h>
#ifdef _OPENMP
#include <omp.h>
#else
#include "Util/OpenMPReplacement.h"
#endif
#include "typedefs.h" #include "typedefs.h"
#include "DataStructures/InputReaderFactory.h" #include "DataStructures/InputReaderFactory.h"
#include "DataStructures/ExtractorCallBacks.h" #include "DataStructures/ExtractorCallBacks.h"

View File

@ -24,12 +24,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#ifdef _OPENMP
#include <omp.h>
#else
#include "Util/OpenMPReplacement.h"
#endif
#include "Server/ServerConfiguration.h" #include "Server/ServerConfiguration.h"
#include "Server/ServerFactory.h" #include "Server/ServerFactory.h"
@ -39,6 +33,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include "Plugins/ObjectForPluginStruct.h" #include "Plugins/ObjectForPluginStruct.h"
#include "Plugins/ViaRoutePlugin.h" #include "Plugins/ViaRoutePlugin.h"
#include "Util/InputFileUtil.h" #include "Util/InputFileUtil.h"
#include "Util/OpenMPReplacement.h"
#ifndef _WIN32 #ifndef _WIN32
#include "Util/LinuxStackTrace.h" #include "Util/LinuxStackTrace.h"