Clean-up debug code (global lock)

This commit is contained in:
Clement Jamin 2014-05-27 12:16:29 +02:00
parent de485dfc10
commit dfe800bc40
3 changed files with 0 additions and 46 deletions

View File

@ -13,7 +13,6 @@
//#define CGAL_MESH_3_EXUDER_HIGH_VERBOSITY //#define CGAL_MESH_3_EXUDER_HIGH_VERBOSITY
//#define CGAL_MESH_3_VERY_VERBOSE //#define CGAL_MESH_3_VERY_VERBOSE
#define CGAL_MESH_3_IO_VERBOSE #define CGAL_MESH_3_IO_VERBOSE
#define CGAL_DEBUG_GLOBAL_LOCK_DS // CJTODO TEMP
//#define SHOW_REMAINING_BAD_ELEMENT_IN_RED //#define SHOW_REMAINING_BAD_ELEMENT_IN_RED

View File

@ -53,30 +53,7 @@ struct Tag_priority_blocking {};
template <typename Derived> template <typename Derived>
class Spatial_lock_grid_base_3 class Spatial_lock_grid_base_3
{ {
#ifdef CGAL_DEBUG_GLOBAL_LOCK_DS
// Just a simple way to store a global pointer to a grid locking data structure
// for debugging purpose...
private: private:
static Derived*& debug_global_lock_ds()
{
static Derived *p_g_lock_ds = NULL;
return p_g_lock_ds;
}
public:
static Derived* get_global_lock_ds()
{
return debug_global_lock_ds();
}
static void set_global_lock_ds(Derived *ds)
{
debug_global_lock_ds() = ds;
}
#endif
private:
static bool *init_TLS_grid(int num_cells_per_axis) static bool *init_TLS_grid(int num_cells_per_axis)
{ {
int num_cells = num_cells_per_axis* int num_cells = num_cells_per_axis*

View File

@ -453,28 +453,6 @@ private:
public: public:
#ifdef CGAL_LINKED_WITH_TBB
// CJTODO TEMP
#ifdef CGAL_DEBUG_GLOBAL_LOCK_DS
template <typename Cell_handle>
bool is_cell_locked_by_this_thread(const Cell_handle &cell_handle) const
{
CGAL::Spatial_lock_grid_3<Tag_priority_blocking> *lock_ds =
CGAL::Spatial_lock_grid_3::get_global_lock_ds();
bool locked = true;
if (lock_ds)
{
for (int iVertex = 0 ; locked && iVertex < 4 ; ++iVertex)
{
locked = lock_ds->is_locked_by_this_thread(
cell_handle->vertex(iVertex)->point());
}
}
return locked;
}
#endif
#endif
// Internal function : assumes the conflict cells are marked. // Internal function : assumes the conflict cells are marked.
template <class CellIt> template <class CellIt>
Vertex_handle _insert_in_hole(CellIt cell_begin, CellIt cell_end, Vertex_handle _insert_in_hole(CellIt cell_begin, CellIt cell_end,