mirror of https://github.com/CGAL/cgal
Removed the CGAL_MESH_3_ACTIVATE_GRID_INDEX_CACHE_IN_VERTEX macro.
It was buggy and useless.
This commit is contained in:
parent
5938113aff
commit
cb89562205
|
|
@ -593,27 +593,7 @@ public:
|
|||
Mesh_3::LockDataStructureType *p_lock_ds = Base::get_lock_data_structure();
|
||||
if (p_lock_ds)
|
||||
{
|
||||
# ifdef CGAL_MESH_3_ACTIVATE_GRID_INDEX_CACHE_IN_VERTEX
|
||||
int grid_index = vh->get_grid_index_cache();
|
||||
if (grid_index >= 0)
|
||||
{
|
||||
if (p_lock_ds->try_lock(grid_index, lock_radius))
|
||||
{
|
||||
// Has the cached valeu changed in the meantime?
|
||||
if (vh->get_grid_index_cache() == grid_index)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::pair<bool, int> r = p_lock_ds->try_lock(vh->point(), lock_radius);
|
||||
vh->set_grid_index_cache(r.second);
|
||||
return r.first;
|
||||
}
|
||||
# else
|
||||
return p_lock_ds->try_lock(vh->point(), lock_radius).first;
|
||||
# endif
|
||||
}
|
||||
}
|
||||
#endif // CGAL_LINKED_WITH_TBB
|
||||
|
|
@ -726,7 +706,8 @@ public:
|
|||
Cell_handle
|
||||
locate(const Point & p,
|
||||
Locate_type & lt, int & li, int & lj,
|
||||
Cell_handle start = Cell_handle()) const;
|
||||
Cell_handle start = Cell_handle(),
|
||||
bool *p_could_lock_zone = 0) const;
|
||||
#else // no CGAL_NO_STRUCTURAL_FILTERING
|
||||
# ifndef CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS
|
||||
# define CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS 2500
|
||||
|
|
|
|||
|
|
@ -23,10 +23,6 @@
|
|||
#include <CGAL/basic.h>
|
||||
#include <CGAL/internal/Dummy_tds_3.h>
|
||||
|
||||
#if defined(CGAL_LINKED_WITH_TBB) && defined(CGAL_MESH_3_ACTIVATE_GRID_INDEX_CACHE_IN_VERTEX)
|
||||
# include <tbb/atomic.h>
|
||||
#endif
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
||||
|
|
@ -85,9 +81,6 @@ public:
|
|||
Triangulation_ds_vertex_base_3()
|
||||
: _c()
|
||||
{
|
||||
#ifdef CGAL_MESH_3_ACTIVATE_GRID_INDEX_CACHE_IN_VERTEX
|
||||
m_grid_index_cache = -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
Triangulation_ds_vertex_base_3(Cell_handle c)
|
||||
|
|
@ -110,17 +103,6 @@ public:
|
|||
{
|
||||
return cell() != Cell_handle();
|
||||
}
|
||||
|
||||
#ifdef CGAL_MESH_3_ACTIVATE_GRID_INDEX_CACHE_IN_VERTEX
|
||||
void set_grid_index_cache (int index)
|
||||
{
|
||||
m_grid_index_cache = index;
|
||||
}
|
||||
int get_grid_index_cache()
|
||||
{
|
||||
return m_grid_index_cache;
|
||||
}
|
||||
#endif
|
||||
|
||||
// For use by the Compact_container.
|
||||
void * for_compact_container() const
|
||||
|
|
@ -129,10 +111,6 @@ public:
|
|||
{ return _c.for_compact_container(); }
|
||||
|
||||
private:
|
||||
|
||||
#ifdef CGAL_MESH_3_ACTIVATE_GRID_INDEX_CACHE_IN_VERTEX
|
||||
tbb::atomic<int> m_grid_index_cache;
|
||||
#endif
|
||||
Cell_handle _c;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue