Commit 82cf5ae8 authored by Sylvain Thery's avatar Sylvain Thery

remove thread parameter

parent 5c0e1f36
......@@ -2,7 +2,7 @@
IF (ONELIB)
SET(CGoGN_LIBS cgogn)
ELSE (ONELIB)
SET(CGoGN_LIBS topology algo container utils)
SET(CGoGN_LIBS algo topology container utils)
ENDIF (ONELIB)
......
......@@ -47,7 +47,7 @@ typedef PFP::VEC3 VEC3 ; // type of R³ vector
template <typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE localvolumeCentroidELW(typename PFP::MAP& map, Vol d, const V_ATT& attributs, unsigned int thread=0)
typename V_ATT::DATA_TYPE localvolumeCentroidELW(typename PFP::MAP& map, Vol d, const V_ATT& attributs)
{
typedef typename V_ATT::DATA_TYPE EMB;
EMB center(0.0);
......
......@@ -143,7 +143,8 @@ IF (WITH_QT)
ADD_DEFINITIONS(${QT_DEFINITIONS})
find_package(QGLViewer REQUIRED)
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${QT_INCLUDE_DIR} ${QGLVIEWER_INCLUDE_DIR} )
SET (CGoGN_EXT_LIBS ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${CGoGN_EXT_LIBS})
SET (CGoGN_EXT_LIBS ${QGLVIEWER_LIBRARIES} ${QT_LIBRARIES} ${CGoGN_EXT_LIBS})
ENDIF (WITH_QT)
IF (WITH_GLEWMX)
......
......@@ -63,10 +63,10 @@ class CellSelector : public CellSelectorGen
typedef CellSelector<MAP, ORBIT> SELECTOR;
public:
CellSelector(MAP& map, const QString& name, unsigned int thread = 0) :
CellSelector(MAP& map, const QString& name) :
CellSelectorGen(name),
m_map(map),
m_cm(map, thread)
m_cm(map)
{}
~CellSelector()
......
......@@ -26,7 +26,7 @@ file(STRINGS ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h ONELIB_STR)
IF (ONELIB_STR EQUAL 1)
SET(CGoGN_LIBS cgogn)
ELSE()
SET(CGoGN_LIBS topology algo container utils)
SET(CGoGN_LIBS algo topology container utils)
ENDIF()
IF(WIN32)
......
......@@ -58,7 +58,7 @@ typename PFP::REAL convexFaceArea(typename PFP::MAP& map, Face f, const VertexAt
//! @param position
//! @return
template <typename PFP>
typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, unsigned int thread = 0) ;
typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position) ;
//! \brief Compute the area of the faces around a vertex.
//! @param map
......@@ -75,16 +75,16 @@ template <typename PFP>
typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Vertex v, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position) ;
template <typename PFP>
void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, FaceAttribute<typename PFP::REAL, typename PFP::MAP>& face_area, unsigned int thread = 0) ;
void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, FaceAttribute<typename PFP::REAL, typename PFP::MAP>& face_area) ;
template <typename PFP>
void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area, unsigned int thread = 0) ;
void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area) ;
template <typename PFP>
void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area, unsigned int thread = 0) ;
void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area) ;
template <typename PFP>
void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area, unsigned int thread = 0) ;
void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area) ;
namespace Parallel
{
......
......@@ -72,7 +72,7 @@ typename PFP::REAL convexFaceArea(typename PFP::MAP& map, Face d, const VertexAt
}
template <typename PFP>
typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, unsigned int thread)
typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position)
{
typename PFP::REAL area(0) ;
......@@ -80,7 +80,7 @@ typename PFP::REAL totalArea(typename PFP::MAP& map, const VertexAttribute<typen
{
area += convexFaceArea<PFP>(map, f, position);
}
,AUTO,thread);
,AUTO);
return area ;
}
......@@ -137,10 +137,10 @@ typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Vertex v, const Ver
}
template <typename PFP>
void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, FaceAttribute<typename PFP::REAL, typename PFP::MAP>& face_area, unsigned int thread)
void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, FaceAttribute<typename PFP::REAL, typename PFP::MAP>& face_area)
{
if ((CGoGN::Parallel::NumberOfThreads > 1) && (thread==0))
if (CGoGN::Parallel::NumberOfThreads > 1)
{
Parallel::computeAreaFaces<PFP>(map,position,face_area);
return;
......@@ -150,14 +150,14 @@ void computeAreaFaces(typename PFP::MAP& map, const VertexAttribute<typename PFP
{
face_area[f] = convexFaceArea<PFP>(map, f, position) ;
}
,AUTO,thread);
,AUTO);
}
template <typename PFP>
void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area, unsigned int thread)
void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area)
{
if ((CGoGN::Parallel::NumberOfThreads > 1) && (thread==0))
if (CGoGN::Parallel::NumberOfThreads > 1)
{
Parallel::computeOneRingAreaVertices<PFP>(map,position,vertex_area);
return;
......@@ -174,14 +174,14 @@ void computeOneRingAreaVertices(typename PFP::MAP& map, const VertexAttribute<ty
vertex_area[v] += areas[f];
});
}
,FORCE_CELL_MARKING,thread);
,FORCE_CELL_MARKING);
}
template <typename PFP>
void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area, unsigned int thread)
void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area)
{
if ((CGoGN::Parallel::NumberOfThreads > 1) && (thread==0))
if (CGoGN::Parallel::NumberOfThreads > 1)
{
Parallel::computeBarycentricAreaVertices<PFP>(map,position,vertex_area);
return;
......@@ -191,13 +191,13 @@ void computeBarycentricAreaVertices(typename PFP::MAP& map, const VertexAttribut
{
vertex_area[v] = vertexBarycentricArea<PFP>(map, v, position) ;
}
,FORCE_CELL_MARKING,thread);
,FORCE_CELL_MARKING);
}
template <typename PFP>
void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area, unsigned int thread)
void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, VertexAttribute<typename PFP::REAL, typename PFP::MAP>& vertex_area)
{
if ((CGoGN::Parallel::NumberOfThreads > 1) && (thread==0))
if (CGoGN::Parallel::NumberOfThreads > 1)
{
Parallel::computeVoronoiAreaVertices<PFP>(map,position,vertex_area);
return;
......@@ -207,7 +207,7 @@ void computeVoronoiAreaVertices(typename PFP::MAP& map, const VertexAttribute<ty
{
vertex_area[v] = vertexVoronoiArea<PFP>(map, v, position) ;
}
,FORCE_CELL_MARKING,thread);
,FORCE_CELL_MARKING);
}
......
......@@ -50,7 +50,7 @@ namespace Geometry
* @param attributs the vector of attribute or cell
*/
template <typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE volumeCentroid(typename PFP::MAP& map, Vol d, const V_ATT& attributs, unsigned int thread = 0);
typename V_ATT::DATA_TYPE volumeCentroid(typename PFP::MAP& map, Vol d, const V_ATT& attributs);
/**
* Compute volume centroid weighted by edge length (generic version)
......@@ -63,7 +63,7 @@ typename V_ATT::DATA_TYPE volumeCentroid(typename PFP::MAP& map, Vol d, const V_
* @param attributs the vector of attribute or cell
*/
template <typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE volumeCentroidELW(typename PFP::MAP& map, Vol d, const V_ATT& attributs, unsigned int thread = 0);
typename V_ATT::DATA_TYPE volumeCentroidELW(typename PFP::MAP& map, Vol d, const V_ATT& attributs);
/**
* Compute face centroid (generic version)
......@@ -106,30 +106,27 @@ typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Ver
* @param map the map
* @param position position vertex attribute
* @param face_centroid centroid face attribute
* @param thread the thread id (default 0)
*/
template <typename PFP, typename V_ATT, typename F_ATT>
void computeCentroidFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_centroid, unsigned int thread = 0);
void computeCentroidFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_centroid);
/**
* Compute centroid of all faces (Edge Length Weighted)
* @param map the map
* @param position position vertex attribute
* @param face_centroid centroid face attribute
* @param thread the thread id (default 0)
*/
template <typename PFP, typename V_ATT, typename F_ATT>
void computeCentroidELWFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_centroid, unsigned int thread = 0) ;
void computeCentroidELWFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_centroid) ;
/**
* Compute neighborhood centroid of all vertices
* @param map the map
* @param position position vertex attribute
* @param vertex_centroid centroid vertex attribute
* @param thread the thread id (default 0)
*/
template <typename PFP, typename V_ATT>
void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& vertex_centroid, unsigned int thread = 0) ;
void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& vertex_centroid) ;
namespace Parallel
......@@ -189,7 +186,7 @@ namespace Geometry
* @param position the vector of attribute or cell
*/
template <typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Vertex d, const V_ATT& attributs, unsigned int thread = 0);
typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Vertex d, const V_ATT& attributs);
/**
* compute centroid of all volumes
......@@ -198,10 +195,10 @@ typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Ver
* @param vol_centroid volume attribute where to store the centroids
*/
template <typename PFP, typename V_ATT, typename W_ATT>
void computeCentroidVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT& vol_centroid, unsigned int thread = 0);
void computeCentroidVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT& vol_centroid);
template <typename PFP, typename V_ATT, typename W_ATT>
void computeCentroidELWVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT& vol_centroid, unsigned int thread = 0);
void computeCentroidELWVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT& vol_centroid);
/**
* compute centroid of all vertices
......@@ -210,7 +207,7 @@ void computeCentroidELWVolumes(typename PFP::MAP& map, const V_ATT& position, W_
* @param vertex_centroid vertex attribute to store the centroids
*/
template <typename PFP, typename V_ATT>
void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& vertex_centroid, unsigned int thread = 0) ;
void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& vertex_centroid) ;
namespace Parallel
......
......@@ -41,7 +41,7 @@ namespace Geometry
{
template <typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE volumeCentroid(typename PFP::MAP& map, Vol d, const V_ATT& attributs, unsigned int thread)
typename V_ATT::DATA_TYPE volumeCentroid(typename PFP::MAP& map, Vol d, const V_ATT& attributs)
{
typename V_ATT::DATA_TYPE center(0.0);
unsigned int count = 0 ;
......@@ -51,14 +51,14 @@ typename V_ATT::DATA_TYPE volumeCentroid(typename PFP::MAP& map, Vol d, const V_
center += attributs[v];
++count;
}
,false,thread);
,false);
center /= double(count) ;
return center ;
}
template <typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE volumeCentroidELW(typename PFP::MAP& map, Vol d, const V_ATT& attributs, unsigned int thread)
typename V_ATT::DATA_TYPE volumeCentroidELW(typename PFP::MAP& map, Vol d, const V_ATT& attributs)
{
typedef typename V_ATT::DATA_TYPE EMB;
EMB center(0.0);
......@@ -72,7 +72,7 @@ typename V_ATT::DATA_TYPE volumeCentroidELW(typename PFP::MAP& map, Vol d, const
double l = (e2-e1).norm();
center += (e1+e2)*l;
count += 2.0*l ;
},false,thread);
},false);
center /= double(count);
return center ;
}
......@@ -129,9 +129,9 @@ typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Ver
}
template <typename PFP, typename V_ATT, typename F_ATT>
void computeCentroidFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_centroid, unsigned int thread)
void computeCentroidFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_centroid)
{
if ((CGoGN::Parallel::NumberOfThreads > 1) && (thread==0))
if (CGoGN::Parallel::NumberOfThreads > 1)
{
Parallel::computeCentroidFaces<PFP,V_ATT,F_ATT>(map,position,face_centroid);
return;
......@@ -141,13 +141,13 @@ void computeCentroidFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT&
{
face_centroid[f] = faceCentroid<PFP,V_ATT>(map, f, position) ;
}
,AUTO,thread);
,AUTO);
}
template <typename PFP, typename V_ATT, typename F_ATT>
void computeCentroidELWFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_centroid, unsigned int thread)
void computeCentroidELWFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_centroid)
{
if ((CGoGN::Parallel::NumberOfThreads > 1) && (thread==0))
if (CGoGN::Parallel::NumberOfThreads > 1)
{
Parallel::computeCentroidELWFaces<PFP,V_ATT,F_ATT>(map,position,face_centroid);
return;
......@@ -157,13 +157,13 @@ void computeCentroidELWFaces(typename PFP::MAP& map, const V_ATT& position, F_AT
{
face_centroid[f] = faceCentroidELW<PFP,V_ATT>(map, f, position) ;
}
,AUTO,thread);
,AUTO);
}
template <typename PFP, typename V_ATT>
void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& vertex_centroid, unsigned int thread)
void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& vertex_centroid)
{
if ((CGoGN::Parallel::NumberOfThreads > 1) && (thread == 0))
if (CGoGN::Parallel::NumberOfThreads > 1)
{
Parallel::computeNeighborhoodCentroidVertices<PFP,V_ATT>(map,position,vertex_centroid);
return;
......@@ -172,7 +172,7 @@ void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& po
foreach_cell<VERTEX>(map, [&] (Vertex v)
{
vertex_centroid[v] = vertexNeighborhoodCentroid<PFP,V_ATT>(map, v, position) ;
}, AUTO, thread);
}, AUTO);
}
......@@ -223,7 +223,7 @@ namespace Geometry
{
template <typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Vertex v, const V_ATT& attributs, unsigned int thread)
typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Vertex v, const V_ATT& attributs)
{
typename V_ATT::DATA_TYPE center(0.0);
unsigned int count = 0 ;
......@@ -231,15 +231,15 @@ typename V_ATT::DATA_TYPE vertexNeighborhoodCentroid(typename PFP::MAP& map, Ver
{
center += attributs[it];
++count ;
}, false, thread);
}, false);
center /= count ;
return center ;
}
template <typename PFP, typename V_ATT, typename W_ATT>
void computeCentroidVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT& vol_centroid, unsigned int thread)
void computeCentroidVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT& vol_centroid)
{
if ((CGoGN::Parallel::NumberOfThreads > 1) && (thread == 0))
if (CGoGN::Parallel::NumberOfThreads > 1)
{
Parallel::computeCentroidVolumes<PFP,V_ATT,W_ATT>(map,position,vol_centroid);
return;
......@@ -247,14 +247,14 @@ void computeCentroidVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT
foreach_cell<VOLUME>(map, [&] (Vol v)
{
vol_centroid[v] = Surface::Geometry::volumeCentroid<PFP,V_ATT>(map, v, position,thread) ;
}, AUTO, thread);
vol_centroid[v] = Surface::Geometry::volumeCentroid<PFP,V_ATT>(map, v, position) ;
}, AUTO);
}
template <typename PFP, typename V_ATT, typename W_ATT>
void computeCentroidELWVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT& vol_centroid, unsigned int thread)
void computeCentroidELWVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT& vol_centroid)
{
if ((CGoGN::Parallel::NumberOfThreads > 1) && (thread == 0))
if (CGoGN::Parallel::NumberOfThreads > 1)
{
Parallel::computeCentroidELWVolumes<PFP,V_ATT,W_ATT>(map,position,vol_centroid);
return;
......@@ -262,14 +262,14 @@ void computeCentroidELWVolumes(typename PFP::MAP& map, const V_ATT& position, W_
foreach_cell<VOLUME>(map, [&] (Vol v)
{
vol_centroid[v] = Surface::Geometry::volumeCentroidELW<PFP,V_ATT>(map, v, position,thread) ;
}, AUTO, thread);
vol_centroid[v] = Surface::Geometry::volumeCentroidELW<PFP,V_ATT>(map, v, position) ;
}, AUTO);
}
template <typename PFP, typename V_ATT>
void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& vertex_centroid, unsigned int thread)
void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& vertex_centroid)
{
if ((CGoGN::Parallel::NumberOfThreads > 1) && (thread == 0))
if (CGoGN::Parallel::NumberOfThreads > 1)
{
Parallel::computeNeighborhoodCentroidVertices<PFP,V_ATT>(map,position,vertex_centroid);
return;
......@@ -278,7 +278,7 @@ void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& po
foreach_cell<VERTEX>(map, [&] (Vertex v)
{
vertex_centroid[v] = Volume::Geometry::vertexNeighborhoodCentroid<PFP,V_ATT>(map, v, position) ;
}, AUTO, thread);
}, AUTO);
}
......@@ -288,27 +288,27 @@ namespace Parallel
template <typename PFP, typename V_ATT, typename W_ATT>
void computeCentroidVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT& vol_centroid)
{
CGoGN::Parallel::foreach_cell<VOLUME>(map, [&] (Vol v, unsigned int thr)
CGoGN::Parallel::foreach_cell<VOLUME>(map, [&] (Vol v, unsigned int /*thr*/)
{
vol_centroid[v] = Surface::Geometry::volumeCentroid<PFP,V_ATT>(map, v, position, thr) ;
vol_centroid[v] = Surface::Geometry::volumeCentroid<PFP,V_ATT>(map, v, position) ;
});
}
template <typename PFP, typename V_ATT, typename W_ATT>
void computeCentroidELWVolumes(typename PFP::MAP& map, const V_ATT& position, W_ATT& vol_centroid)
{
CGoGN::Parallel::foreach_cell<VOLUME>(map, [&] (Vol v, unsigned int thr)
CGoGN::Parallel::foreach_cell<VOLUME>(map, [&] (Vol v, unsigned int /*thr*/)
{
vol_centroid[v] = Surface::Geometry::volumeCentroidELW<PFP,V_ATT>(map, v, position, thr) ;
vol_centroid[v] = Surface::Geometry::volumeCentroidELW<PFP,V_ATT>(map, v, position) ;
});
}
template <typename PFP, typename V_ATT>
void computeNeighborhoodCentroidVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& vertex_centroid)
{
CGoGN::Parallel::foreach_cell<VERTEX>(map, [&] (Vertex v, unsigned int thr)
CGoGN::Parallel::foreach_cell<VERTEX>(map, [&] (Vertex v, unsigned int /*thr*/)
{
vertex_centroid[v] = Volume::Geometry::vertexNeighborhoodCentroid<PFP,V_ATT>(map, v, position,thr) ;
vertex_centroid[v] = Volume::Geometry::vertexNeighborhoodCentroid<PFP,V_ATT>(map, v, position) ;
}, FORCE_CELL_MARKING);
}
......
......@@ -58,8 +58,7 @@ void computeCurvatureVertices_QuadraticFitting(
VertexAttribute<typename PFP::REAL, typename PFP::MAP>& kmax,
VertexAttribute<typename PFP::REAL, typename PFP::MAP>& kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmax,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin,
unsigned int thread = 0) ;
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin) ;
template <typename PFP>
void computeCurvatureVertex_QuadraticFitting(
......@@ -118,8 +117,7 @@ void computeCurvatureVertices_NormalCycles(
VertexAttribute<typename PFP::REAL, typename PFP::MAP>& kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmax,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal,
unsigned int thread = 0) ;
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal) ;
template <typename PFP>
void computeCurvatureVertex_NormalCycles(
......@@ -133,8 +131,7 @@ void computeCurvatureVertex_NormalCycles(
VertexAttribute<typename PFP::REAL, typename PFP::MAP>& kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmax,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal,
unsigned int thread = 0) ;
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal) ;
template <typename PFP>
void normalCycles_SortAndSetEigenComponents(
......@@ -145,19 +142,16 @@ void normalCycles_SortAndSetEigenComponents(
typename PFP::VEC3& Kmax,
typename PFP::VEC3& Kmin,
typename PFP::VEC3& Knormal,
const typename PFP::VEC3& normal,
unsigned int thread = 0) ;
const typename PFP::VEC3& normal) ;
template <typename PFP>
void normalCycles_SortTensor(
Geom::Matrix<3,3,typename PFP::REAL>& tensor,
unsigned int thread = 0) ;
Geom::Matrix<3,3,typename PFP::REAL>& tensor) ;
template <typename PFP>
void normalCycles_ProjectTensor(
Geom::Matrix<3,3,typename PFP::REAL>& tensor,
const typename PFP::VEC3& normal_vector,
unsigned int thread = 0) ;
const typename PFP::VEC3& normal_vector) ;
template <typename PFP>
void computeCurvatureVertices_NormalCycles_Projected(
......@@ -170,8 +164,7 @@ void computeCurvatureVertices_NormalCycles_Projected(
VertexAttribute<typename PFP::REAL, typename PFP::MAP>& kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmax,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal,
unsigned int thread = 0) ;
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal) ;
template <typename PFP>
void computeCurvatureVertex_NormalCycles_Projected(
......@@ -185,8 +178,7 @@ void computeCurvatureVertex_NormalCycles_Projected(
VertexAttribute<typename PFP::REAL, typename PFP::MAP>& kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmax,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal,
unsigned int thread = 0) ;
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal) ;
/* normal cycles with collector as a parameter : not usable in parallel */
......@@ -201,8 +193,7 @@ void computeCurvatureVertices_NormalCycles(
VertexAttribute<typename PFP::REAL, typename PFP::MAP>& kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmax,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal,
unsigned int thread = 0) ;
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal) ;
template <typename PFP>
void computeCurvatureVertex_NormalCycles(
......@@ -215,8 +206,7 @@ void computeCurvatureVertex_NormalCycles(
VertexAttribute<typename PFP::REAL, typename PFP::MAP>& kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmax,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal,
unsigned int thread = 0) ;
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal) ;
template <typename PFP>
void computeCurvatureVertices_NormalCycles_Projected(
......@@ -229,8 +219,7 @@ void computeCurvatureVertices_NormalCycles_Projected(
VertexAttribute<typename PFP::REAL, typename PFP::MAP>& kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmax,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal,
unsigned int thread = 0) ;
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal) ;
template <typename PFP>
void computeCurvatureVertex_NormalCycles_Projected(
......@@ -243,8 +232,7 @@ void computeCurvatureVertex_NormalCycles_Projected(
VertexAttribute<typename PFP::REAL, typename PFP::MAP>& kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmax,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Kmin,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal,
unsigned int thread = 0) ;
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& Knormal) ;
namespace Parallel
......
This diff is collapsed.
......@@ -62,8 +62,7 @@ void computeFaceGradient(
const FaceAttribute<typename PFP::VEC3, typename PFP::MAP>& face_normal,
const VertexAttribute<typename PFP::REAL, typename PFP::MAP>& scalar,
const FaceAttribute<typename PFP::REAL, typename PFP::MAP>& face_area,
FaceAttribute<typename PFP::VEC3, typename PFP::MAP>& face_gradient,
unsigned int thread = 0) ;
FaceAttribute<typename PFP::VEC3, typename PFP::MAP>& face_gradient) ;
template <typename PFP>
typename PFP::VEC3 faceGradient(
......@@ -79,8 +78,7 @@ void computeVertexGradient(
typename PFP::MAP& map,
const FaceAttribute<typename PFP::VEC3, typename PFP::MAP>& face_gradient,
const FaceAttribute<typename PFP::REAL, typename PFP::MAP>& face_area,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& vertex_gradient,
unsigned int thread = 0) ;
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& vertex_gradient) ;
template <typename PFP>
typename PFP::VEC3 vertexGradient(
......@@ -101,8 +99,7 @@ template <typename PFP>
void computeTriangleType(
typename PFP::MAP& map,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& K,
CellMarker<typename PFP::MAP, FACE>& regularMarker,
unsigned int thread = 0) ;
CellMarker<typename PFP::MAP, FACE>& regularMarker) ;
template <typename PFP>
bool isTriangleRegular(
......@@ -113,8 +110,7 @@ bool isTriangleRegular(
template <typename PFP>
void initRidgeSegments(
typename PFP::MAP& map,
FaceAttribute<ridgeSegment, typename PFP::MAP>& ridge_segments,
unsigned int thread = 0) ;
FaceAttribute<ridgeSegment, typename PFP::MAP>& ridge_segments) ;
template <typename PFP>
void computeRidgeLines(
......@@ -125,8 +121,7 @@ void computeRidgeLines(
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& vertex_gradient,
const VertexAttribute<typename PFP::REAL, typename PFP::MAP>& k,
const VertexAttribute<typename PFP::REAL, typename PFP::MAP>& k2,
FaceAttribute<ridgeSegment, typename PFP::MAP>& ridge_segments,
unsigned int thread = 0) ;
FaceAttribute<ridgeSegment, typename PFP::MAP>& ridge_segments) ;
template <typename PFP>
void ridgeLines(
......@@ -144,8 +139,7 @@ template <typename PFP>
void computeSingularTriangle(
typename PFP::MAP& map,
CellMarker<typename PFP::MAP, FACE>& regularMarker,
FaceAttribute<ridgeSegment, typename PFP::MAP>& ridge_segments,
unsigned int thread = 0) ;
FaceAttribute<ridgeSegment, typename PFP::MAP>& ridge_segments) ;
template <typename PFP>
void singularTriangle(
......
......@@ -72,10 +72,9 @@ void computeFaceGradient(
const FaceAttribute<typename PFP::VEC3, typename PFP::MAP>& face_normal,
const VertexAttribute<typename PFP::REAL, typename PFP::MAP>& scalar,
const FaceAttribute<typename PFP::REAL, typename PFP::MAP>& area,
FaceAttribute<typename PFP::VEC3, typename PFP::MAP>& face_gradient,
unsigned int thread)
FaceAttribute<typename PFP::VEC3, typename PFP::MAP>& face_gradient)
{
TraversorF<typename PFP::MAP> trav(map, thread);
TraversorF<typename PFP::MAP> trav(map);
for (Dart d = trav.begin(); d != trav.end(); d = trav.next())
face_gradient[d] = faceGradient<PFP>(map, d, position, face_normal, scalar, area) ;
}
......@@ -121,10 +120,9 @@ void computeVertexGradient(
typename PFP::MAP& map,
const FaceAttribute<typename PFP::VEC3, typename PFP::MAP>& face_gradient,
const FaceAttribute<typename PFP::REAL, typename PFP::MAP>& face_area,
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& vertex_gradient,
unsigned int thread)
VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& vertex_gradient)
{
TraversorV<typename PFP::MAP> trav(map, thread);
TraversorV<typename PFP::MAP> trav(map);
for (Dart d = trav.begin(); d != trav.end(); d = trav.next())
vertex_gradient[d] = vertexGradient<PFP>(map, d, face_gradient, face_area) ;
}
......@@ -177,10 +175,9 @@ template <typename PFP>
void computeTriangleType(
typename PFP::MAP& map,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& K,
CellMarker<typename PFP::MAP, FACE>& regularMarker,
unsigned int thread)
CellMarker<typename PFP::MAP, FACE>& regularMarker)