diff --git a/PoissonRecon.pro b/PoissonRecon.pro new file mode 100755 index 00000000..33f5bf60 --- /dev/null +++ b/PoissonRecon.pro @@ -0,0 +1,36 @@ +QT -= core gui +INCLUDEPATH -= . + +### begin mac specific part ################# +# On OSX xcode clang does NOT support OpenMP. +# Use these two lines if you installed an alternative clang with macport +# (something like 'sudo port install clang-3.9') +# Note that on osx qtcreator could have just a vanilla path environment, +# so, if using the below option fails to find the port-installed compiler you should +# add the port bin folder to the qtcreator environment path +# (adding something like PATH="/opt/local/bin:/opt/local/sbin:$PATH" ) +macx:QMAKE_CXX = clang++-mp-3.9 +macx:QMAKE_LFLAGS += -L/opt/local/lib/libomp -lomp + +# Use this if you want to use the standard clang distributed with xcode +# macx:QMAKE_CXXFLAGS-= -fopenmp + +# Mac specific Config required to avoid to make application bundles +CONFIG -= app_bundle +### end of mac specific part ################# + +QMAKE_CXXFLAGS+=-fopenmp -Wsign-compare -O3 -DRELEASE -funroll-loops -ffast-math + +CONFIG += console warn_off +TEMPLATE = app + +SOURCES += Src/PoissonRecon.cpp \ + Src/MarchingCubes.cpp \ + Src/PlyFile.cpp \ + Src/CmdLineParser.cpp \ + Src/Factor.cpp \ + Src/Geometry.cpp + + +TARGET=PoissonRecon + diff --git a/Src/MultiGridOctreeData.h b/Src/MultiGridOctreeData.h index 595ebdc7..b5aa8082 100644 --- a/Src/MultiGridOctreeData.h +++ b/Src/MultiGridOctreeData.h @@ -54,7 +54,9 @@ DAMAGE. #define MAX_MEMORY_GB 0 #include +#ifdef _OPENMP #include +#endif // _OPENMP #include "BSplineData.h" #include "PointStream.h" #include "Geometry.h" @@ -336,7 +338,7 @@ struct DenseNodeData Data& operator[]( const OctNode< TreeNodeData >* node ) { return _data[ node->nodeData.nodeIndex ]; } Data* operator()( const OctNode< TreeNodeData >* node ) { return ( node==NULL || node->nodeData.nodeIndex>=(int)_sz ) ? NULL : &_data[ node->nodeData.nodeIndex ]; } const Data* operator()( const OctNode< TreeNodeData >* node ) const { return ( node==NULL || node->nodeData.nodeIndex>=(int)_sz ) ? NULL : &_data[ node->nodeData.nodeIndex ]; } - int index( const OctNode< TreeNodeData >* node ) const { return ( !node || node->nodeData.nodeIndex<0 || node->nodeData.nodeIndex>=(int)_data.size() ) ? -1 : node->nodeData.nodeIndex; } + int index( const OctNode< TreeNodeData >* node ) const { return ( !node || node->nodeData.nodeIndex<0 || node->nodeData.nodeIndex>=(int)this->_data.size() ) ? -1 : node->nodeData.nodeIndex; } protected: size_t _sz; void _resize( size_t sz ){ DeletePointer( _data ) ; if( sz ) _data = NewPointer< Data >( sz ) ; else _data = NullPointer( Data ) ; _sz = sz; }