fix compilation on mac; openmp issues and an unneeded typename
This commit is contained in:
parent
f10bf842c6
commit
f511af0f0c
2
.gitignore
vendored
2
.gitignore
vendored
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
# OS generated files #
|
# OS generated files #
|
||||||
######################
|
######################
|
||||||
.DS_Store?
|
.DS_Store
|
||||||
ehthumbs.db
|
ehthumbs.db
|
||||||
Icon?
|
Icon?
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
@ -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:
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
|
||||||
@ -190,7 +188,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~Contractor() { }
|
~Contractor() { }
|
||||||
|
|
||||||
void Run() {
|
void Run() {
|
||||||
const NodeID numberOfNodes = _graph->GetNumberOfNodes();
|
const NodeID numberOfNodes = _graph->GetNumberOfNodes();
|
||||||
Percent p (numberOfNodes);
|
Percent p (numberOfNodes);
|
||||||
|
@ -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();
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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"
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user