mirror of https://github.com/CGAL/cgal
Moved helper struct outside of TBB macros to fix sequential compilation
This commit is contained in:
parent
7e75a8a243
commit
bb19c965f9
|
|
@ -763,6 +763,25 @@ namespace CGAL {
|
||||||
return std::copy(vertices.begin(), vertices.end(), res);
|
return std::copy(vertices.begin(), vertices.end(), res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In parallel operations, we need to be able to check the health of the 'hint' vertex handle,
|
||||||
|
// which might be invalided by other threads. One way to do that is the 'is_vertex()' function
|
||||||
|
// of the TDS, but it runs in O(sqrt(n)) complexity. When we are using our TDS, we can use
|
||||||
|
// a lower level function from the compact container, which runs in constant time.
|
||||||
|
template <typename TDS_>
|
||||||
|
struct Vertex_validity_checker
|
||||||
|
{
|
||||||
|
bool operator()(const typename TDS_::Vertex_handle vh_, const TDS_& tds_) { return tds_.is_vertex(vh_); }
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T1, typename T2, typename T3>
|
||||||
|
struct Vertex_validity_checker<CGAL::Triangulation_data_structure_3<T1, T2, T3> >
|
||||||
|
{
|
||||||
|
typedef CGAL::Triangulation_data_structure_3<T1, T2, T3> TDS_;
|
||||||
|
|
||||||
|
bool operator()(const typename TDS_::Vertex_handle vh_, const TDS_& tds_) {
|
||||||
|
return tds_.vertices().is_used(vh_); }
|
||||||
|
};
|
||||||
|
|
||||||
void remove (Vertex_handle v);
|
void remove (Vertex_handle v);
|
||||||
// Concurrency-safe
|
// Concurrency-safe
|
||||||
// See Triangulation_3::remove for more information
|
// See Triangulation_3::remove for more information
|
||||||
|
|
@ -1291,25 +1310,6 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// In parallel operations, we need to be able to check the health of the 'hint' vertex handle,
|
|
||||||
// which might be invalided by other threads. One way to do that is the 'is_vertex()' function
|
|
||||||
// of the TDS, but it runs in O(sqrt(n)) complexity. When we are using our TDS, we can use
|
|
||||||
// a lower level function from the compact container, which runs in constant time.
|
|
||||||
template <typename TDS_>
|
|
||||||
struct Vertex_validity_checker
|
|
||||||
{
|
|
||||||
bool operator()(const typename TDS_::Vertex_handle vh_, const TDS_& tds_) { return tds_.is_vertex(vh_); }
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3>
|
|
||||||
struct Vertex_validity_checker<CGAL::Triangulation_data_structure_3<T1, T2, T3> >
|
|
||||||
{
|
|
||||||
typedef CGAL::Triangulation_data_structure_3<T1, T2, T3> TDS_;
|
|
||||||
|
|
||||||
bool operator()(const typename TDS_::Vertex_handle vh_, const TDS_& tds_) {
|
|
||||||
return tds_.vertices().is_used(vh_); }
|
|
||||||
};
|
|
||||||
|
|
||||||
// Functor for parallel insert(begin, end) function
|
// Functor for parallel insert(begin, end) function
|
||||||
template <typename RT>
|
template <typename RT>
|
||||||
class Insert_point
|
class Insert_point
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue