mirror of https://github.com/CGAL/cgal
Clean-up + some debugging functions + comments
This commit is contained in:
parent
b37b928684
commit
dc5e90b8cc
|
|
@ -703,6 +703,22 @@ public:
|
|||
|
||||
return success;
|
||||
}
|
||||
|
||||
template <typename P3>
|
||||
bool is_point_locked_by_this_thread(const P3 &p) const
|
||||
{
|
||||
bool locked = true;
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
# ifdef CGAL_MESH_3_LOCKING_STRATEGY_SIMPLE_GRID_LOCKING
|
||||
Mesh_3::LockDataStructureType *p_lock_ds = Base::get_lock_data_structure();
|
||||
if (p_lock_ds)
|
||||
{
|
||||
locked = p_lock_ds->is_locked_by_this_thread(p);
|
||||
}
|
||||
# endif // CGAL_MESH_3_LOCKING_STRATEGY_SIMPLE_GRID_LOCKING
|
||||
#endif // CGAL_LINKED_WITH_TBB
|
||||
return locked;
|
||||
}
|
||||
|
||||
bool is_element_locked_by_this_thread(Cell_handle cell_handle) const
|
||||
{
|
||||
|
|
@ -712,11 +728,7 @@ public:
|
|||
Mesh_3::LockDataStructureType *p_lock_ds = Base::get_lock_data_structure();
|
||||
if (p_lock_ds)
|
||||
{
|
||||
for (int iVertex = 0 ; locked && iVertex < 4 ; ++iVertex)
|
||||
{
|
||||
Vertex_handle vh = cell_handle->vertex(iVertex);
|
||||
locked = p_lock_ds->is_locked_by_this_thread(vh->point());
|
||||
}
|
||||
locked = p_lock_ds->is_tetrahedra_locked_by_this_thread(*cell_handle);
|
||||
}
|
||||
# endif // CGAL_MESH_3_LOCKING_STRATEGY_SIMPLE_GRID_LOCKING
|
||||
#endif // CGAL_LINKED_WITH_TBB
|
||||
|
|
@ -3300,16 +3312,6 @@ insert_in_conflict(const Point & p,
|
|||
std::back_inserter(cells),
|
||||
Emptyset_iterator()));
|
||||
|
||||
// CJTODO TEST LOCK
|
||||
for (Cell_handle ch : cells)
|
||||
{
|
||||
if (!is_element_locked_by_this_thread(ch))
|
||||
{
|
||||
std::cerr << "************************ ARGH ****************" << std::endl;
|
||||
int i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Remember the points that are hidden by the conflicting cells,
|
||||
// as they will be deleted during the insertion.
|
||||
hider.process_cells_in_conflict(cells.begin(), cells.end());
|
||||
|
|
|
|||
|
|
@ -1280,7 +1280,7 @@ create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2)
|
|||
n = cur->neighbor(zz);
|
||||
}
|
||||
// Now n is outside region, cur is inside.
|
||||
|
||||
// CJTODO DATA RACE?
|
||||
n->tds_data().clear(); // Reset the flag for boundary cells.
|
||||
|
||||
int jj1 = n->index(vj1);
|
||||
|
|
@ -1339,7 +1339,7 @@ recursive_create_star_3(Vertex_handle v, Cell_handle c, int li,
|
|||
n = cur->neighbor(zz);
|
||||
}
|
||||
// Now n is outside region, cur is inside.
|
||||
|
||||
// CJTODO DATA RACE?
|
||||
n->tds_data().clear(); // Reset the flag for boundary cells.
|
||||
|
||||
int jj1 = n->index(vj1);
|
||||
|
|
@ -1404,7 +1404,7 @@ non_recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind
|
|||
n = cur->neighbor(zz);
|
||||
}
|
||||
// Now n is outside region, cur is inside.
|
||||
|
||||
// CJTODO DATA RACE?
|
||||
n->tds_data().clear(); // Reset the flag for boundary cells.
|
||||
|
||||
int jj1 = n->index(vj1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue