From d215dbaa8ba6139e7b48113365f25ada3663bb98 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Wed, 15 Nov 2023 23:37:50 +0100 Subject: [PATCH] debug PoissonRecon on macOS: fix following https://github.com/mkazhdan/PoissonRecon/issues/190 --- Src/FEMTree.IsoSurface.specialized.inl | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Src/FEMTree.IsoSurface.specialized.inl b/Src/FEMTree.IsoSurface.specialized.inl index 28b5ef0..b517527 100644 --- a/Src/FEMTree.IsoSurface.specialized.inl +++ b/Src/FEMTree.IsoSurface.specialized.inl @@ -815,17 +815,31 @@ protected: _SliceValues& sValues = slabValues[depth].sliceValues( slice ); bool useBoundaryEvaluation = false; for( int d=0 ; d::Degree ... > > > neighborKeys(1); + std::vector< ConstCornerSupportKey< UIntPack< FEMSignature< FEMSigs >::Degree ... > > > bNeighborKeys(1); +#else std::vector< ConstPointSupportKey< UIntPack< FEMSignature< FEMSigs >::Degree ... > > > neighborKeys( ThreadPool::NumThreads() ); std::vector< ConstCornerSupportKey< UIntPack< FEMSignature< FEMSigs >::Degree ... > > > bNeighborKeys( ThreadPool::NumThreads() ); +#endif if( useBoundaryEvaluation ) for( size_t i=0 ; i::template ElementNum< 0 >() ]; +#if defined(__APPLE__) + ConstPointSupportKey< UIntPack< FEMSignature< FEMSigs >::Degree ... > >& neighborKey = neighborKeys[0]; + ConstCornerSupportKey< UIntPack< FEMSignature< FEMSigs >::Degree ... > >& bNeighborKey = bNeighborKeys[0]; +#else ConstPointSupportKey< UIntPack< FEMSignature< FEMSigs >::Degree ... > >& neighborKey = neighborKeys[ thread ]; ConstCornerSupportKey< UIntPack< FEMSignature< FEMSigs >::Degree ... > >& bNeighborKey = bNeighborKeys[ thread ]; +#endif TreeNode* leaf = tree._sNodes.treeNodes[i]; if( !IsActiveNode< Dim >( leaf->children ) ) { @@ -874,7 +888,11 @@ protected: } } } - ); +#if defined(__APPLE__) + // --- end serial loop +#else + ); // --- end parallel for loop +#endif } ///////////////// // _VertexData //