Restart lcc

This commit is contained in:
Guillaume Damiand 2022-04-14 13:58:27 +02:00
parent 409ba827ef
commit ed3080e2e3
6 changed files with 51 additions and 47 deletions

View File

@ -58,8 +58,6 @@ namespace CGAL {
Multiply_by_two_policy_for_cc_with_size<64>, Index_type> Multiply_by_two_policy_for_cc_with_size<64>, Index_type>
Dart_container; Dart_container;
// typedef unsigned int Dart_index;
// typedef MyIndex<unsigned int> Dart_index;
typedef typename Dart_container::Index Dart_index; typedef typename Dart_container::Index Dart_index;
// Definition of old types, for backward compatibility. // Definition of old types, for backward compatibility.
@ -480,7 +478,7 @@ namespace CGAL {
/// null_handle /// null_handle
template<unsigned int d_, class Items_, class Alloc_> template<unsigned int d_, class Items_, class Alloc_>
typename Combinatorial_map_storage_2<d_, Items_, Alloc_>::Null_handle_type typename Combinatorial_map_storage_2<d_, Items_, Alloc_>::Null_handle_type
Combinatorial_map_storage_2<d_, Items_, Alloc_>::null_handle((std::numeric_limits<size_type>::max)()/2); Combinatorial_map_storage_2<d_, Items_, Alloc_>::null_handle((std::numeric_limits<Index_type>::max)()/2);
} // namespace CGAL } // namespace CGAL

View File

@ -58,8 +58,6 @@ namespace CGAL {
Multiply_by_two_policy_for_cc_with_size<64>, Index_type> Multiply_by_two_policy_for_cc_with_size<64>, Index_type>
Dart_container; Dart_container;
// typedef unsigned int Dart_index;
// typedef MyIndex<unsigned int> Dart_index;
typedef typename Dart_container::Index Dart_index; typedef typename Dart_container::Index Dart_index;
// Definition of old types, for backward compatibility. // Definition of old types, for backward compatibility.
@ -431,7 +429,7 @@ namespace CGAL {
/// null_handle /// null_handle
template<unsigned int d_, class Items_, class Alloc_> template<unsigned int d_, class Items_, class Alloc_>
typename Generalized_map_storage_2<d_, Items_, Alloc_>::Null_handle_type typename Generalized_map_storage_2<d_, Items_, Alloc_>::Null_handle_type
Generalized_map_storage_2<d_, Items_, Alloc_>::null_handle((std::numeric_limits<size_type>::max)()/2); Generalized_map_storage_2<d_, Items_, Alloc_>::null_handle((std::numeric_limits<Index_type>::max)()/2);
} // namespace CGAL } // namespace CGAL

View File

@ -40,13 +40,14 @@ namespace CGAL {
// as template parameter of Dart_wrapper. If we inherit, Self is not // as template parameter of Dart_wrapper. If we inherit, Self is not
// the correct type). // the correct type).
template<unsigned int d_, unsigned int ambient_dim, template<unsigned int d_, unsigned int ambient_dim,
class Traits_, class Items_, class Alloc_, class Concurrent_tag > class Traits_, class Items_, class Alloc_>
class CMap_linear_cell_complex_storage_1 class CMap_linear_cell_complex_storage_1
{ {
public: public:
using Self=CMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_, using Self=CMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
Items_, Alloc_, Concurrent_tag>; Items_, Alloc_>;
using Use_index=CGAL::Tag_false; using Use_index=CGAL::Tag_false;
using Concurrent_tag=typename internal::Get_concurrent_tag<Items_>::type;
typedef typename Traits_::Point Point; typedef typename Traits_::Point Point;
typedef typename Traits_::Vector Vector; typedef typename Traits_::Vector Vector;
@ -75,6 +76,8 @@ namespace CGAL {
typedef std::nullptr_t Null_handle_type; typedef std::nullptr_t Null_handle_type;
static const Null_handle_type null_handle; static const Null_handle_type null_handle;
using Type_for_compact_container=void*;
typedef Items_ Items; typedef Items_ Items;
typedef Alloc_ Alloc; typedef Alloc_ Alloc;
template <typename T> template <typename T>
@ -481,9 +484,9 @@ namespace CGAL {
template<unsigned int d_, unsigned int ambient_dim, template<unsigned int d_, unsigned int ambient_dim,
class Traits_, class Items_, class Alloc_, class Concurrent_tag > class Traits_, class Items_, class Alloc_, class Concurrent_tag >
const typename CMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_, const typename CMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
Items_, Alloc_, Concurrent_tag>::Null_handle_type Items_, Alloc_>::Null_handle_type
CMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_, CMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
Items_, Alloc_, Concurrent_tag>::null_handle = nullptr; Items_, Alloc_>::null_handle = nullptr;
} // namespace CGAL } // namespace CGAL

View File

@ -38,26 +38,24 @@ namespace CGAL {
// as template parameter of Dart_wrapper. If we inherit, Self is not // as template parameter of Dart_wrapper. If we inherit, Self is not
// the correct type). // the correct type).
template<unsigned int d_, unsigned int ambient_dim, class Traits_, template<unsigned int d_, unsigned int ambient_dim, class Traits_,
class Items_, class Alloc_, class Index_type_ > class Items_, class Alloc_>
class CMap_linear_cell_complex_storage_2 class CMap_linear_cell_complex_storage_2
{ {
public: public:
using Self=CMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, using Self=CMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_,
Items_, Alloc_, Index_type_>; Items_, Alloc_>;
using Use_index=CGAL::Tag_true; using Use_index=CGAL::Tag_true;
using Index_type=Index_type_; using Concurrent_tag=typename internal::Get_concurrent_tag<Items_>::type;
typedef typename Traits_::Point Point;
typedef typename Traits_::Vector Vector;
typedef typename Traits_::FT FT;
typedef internal::Combinatorial_map_helper<Self> Helper; typedef internal::Combinatorial_map_helper<Self> Helper;
using Index_type=typename internal::Get_index_type<Items_>::type;
typedef typename Items_::template Dart_wrapper<Self> Dart_wrapper; typedef typename Items_::template Dart_wrapper<Self> Dart_wrapper;
typedef typename internal::template Get_dart_info<Dart_wrapper>::type typedef typename internal::template Get_dart_info<Dart_wrapper>::type
Dart_info; Dart_info;
typedef CGAL::Index::Dart<d_, Self, Dart_info> Dart; typedef CGAL::Dart<d_, Self, Dart_info> Dart;
typedef std::allocator_traits<Alloc_> Allocator_traits; typedef std::allocator_traits<Alloc_> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator; typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator;
@ -78,6 +76,8 @@ namespace CGAL {
typedef Dart_index Null_handle_type; typedef Dart_index Null_handle_type;
static Null_handle_type null_handle; static Null_handle_type null_handle;
using Type_for_compact_container=Index_type;
typedef Items_ Items; typedef Items_ Items;
typedef Alloc_ Alloc; typedef Alloc_ Alloc;
template <typename T> template <typename T>
@ -503,18 +503,18 @@ namespace CGAL {
/// null_dart_handle /// null_dart_handle
template<unsigned int d_, unsigned int ambient_dim, class Traits_, template<unsigned int d_, unsigned int ambient_dim, class Traits_,
class Items_, class Alloc_, class Index_type_> class Items_, class Alloc_>
typename CMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, Items_, Alloc_, Index_type_>:: typename CMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, Items_, Alloc_>::
Dart_index CMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, Items_, Alloc_, Index_type_>:: Dart_index CMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, Items_, Alloc_>::
null_dart_handle(0); null_dart_handle(0);
/// null_handle /// null_handle
template<unsigned int d_, unsigned int ambient_dim, class Traits_, template<unsigned int d_, unsigned int ambient_dim, class Traits_,
class Items_, class Alloc_, class Index_type_> class Items_, class Alloc_>
typename CMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, Items_, Alloc_, Index_type_>:: typename CMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, Items_, Alloc_>::
Null_handle_type CMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, Null_handle_type CMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_,
Items_, Alloc_, Index_type_>:: Items_, Alloc_>::
null_handle((std::numeric_limits<Index_type_>::max)()/2); null_handle((std::numeric_limits<Index_type>::max)()/2);
} // namespace CGAL } // namespace CGAL

View File

@ -40,13 +40,14 @@ namespace CGAL {
// as template parameter of Dart_wrapper. If we inherit, Self is not // as template parameter of Dart_wrapper. If we inherit, Self is not
// the correct type). // the correct type).
template<unsigned int d_, unsigned int ambient_dim, template<unsigned int d_, unsigned int ambient_dim,
class Traits_, class Items_, class Alloc_, class Concurrent_tag > class Traits_, class Items_, class Alloc_>
class GMap_linear_cell_complex_storage_1 class GMap_linear_cell_complex_storage_1
{ {
public: public:
using Self=GMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_, using Self=GMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
Items_, Alloc_, Concurrent_tag>; Items_, Alloc_>;
using Use_index=CGAL::Tag_false; using Use_index=CGAL::Tag_false;
using Concurrent_tag=typename internal::Get_concurrent_tag<Items_>::type;
typedef typename Traits_::Point Point; typedef typename Traits_::Point Point;
typedef typename Traits_::Vector Vector; typedef typename Traits_::Vector Vector;
@ -75,6 +76,8 @@ namespace CGAL {
typedef std::nullptr_t Null_handle_type; typedef std::nullptr_t Null_handle_type;
static const Null_handle_type null_handle; static const Null_handle_type null_handle;
using Type_for_compact_container=void*;
typedef Items_ Items; typedef Items_ Items;
typedef Alloc_ Alloc; typedef Alloc_ Alloc;
template <typename T> template <typename T>
@ -467,11 +470,11 @@ namespace CGAL {
/// null_handle /// null_handle
template <unsigned int d_, unsigned int ambient_dim, template <unsigned int d_, unsigned int ambient_dim,
class Traits_, class Items_, class Alloc_, class Concurrent_tag > class Traits_, class Items_, class Alloc_>
const typename GMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_, const typename GMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
Items_, Alloc_, Concurrent_tag>::Null_handle_type Items_, Alloc_>::Null_handle_type
GMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_, GMap_linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
Items_, Alloc_, Concurrent_tag>::null_handle = nullptr; Items_, Alloc_>::null_handle = nullptr;
} // namespace CGAL } // namespace CGAL
#if defined(BOOST_GCC) #if defined(BOOST_GCC)

View File

@ -38,26 +38,28 @@ namespace CGAL {
// as template parameter of Dart_wrapper. If we inherit, Self is not // as template parameter of Dart_wrapper. If we inherit, Self is not
// the correct type). // the correct type).
template<unsigned int d_, unsigned int ambient_dim, class Traits_, template<unsigned int d_, unsigned int ambient_dim, class Traits_,
class Items_, class Alloc_, class Index_type_ > class Items_, class Alloc_>
class GMap_linear_cell_complex_storage_2 class GMap_linear_cell_complex_storage_2
{ {
public: public:
using Self=GMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, using Self=GMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_,
Items_, Alloc_, Index_type_>; Items_, Alloc_>;
using Use_index=CGAL::Tag_true; using Use_index=CGAL::Tag_true;
using Index_type=Index_type_; using Concurrent_tag=typename internal::Get_concurrent_tag<Items_>::type;
typedef internal::Combinatorial_map_helper<Self> Helper;
using Index_type=typename internal::Get_index_type<Items_>::type;
typedef typename Traits_::Point Point; typedef typename Traits_::Point Point;
typedef typename Traits_::Vector Vector; typedef typename Traits_::Vector Vector;
typedef typename Traits_::FT FT; typedef typename Traits_::FT FT;
typedef internal::Combinatorial_map_helper<Self> Helper;
typedef typename Items_::template Dart_wrapper<Self> Dart_wrapper; typedef typename Items_::template Dart_wrapper<Self> Dart_wrapper;
typedef typename internal::template Get_dart_info<Dart_wrapper>::type typedef typename internal::template Get_dart_info<Dart_wrapper>::type
Dart_info; Dart_info;
typedef CGAL::Index::Dart<d_, Self, Dart_info> Dart; typedef CGAL::Dart<d_, Self, Dart_info> Dart;
typedef std::allocator_traits<Alloc_> Allocator_traits; typedef std::allocator_traits<Alloc_> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator; typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator;
@ -66,8 +68,6 @@ namespace CGAL {
Multiply_by_two_policy_for_cc_with_size<64>, Index_type> Multiply_by_two_policy_for_cc_with_size<64>, Index_type>
Dart_container; Dart_container;
// typedef unsigned int Dart_index;
// typedef MyIndex<unsigned int> Dart_index;
typedef typename Dart_container::Index Dart_index; typedef typename Dart_container::Index Dart_index;
// Definition of old types, for backward compatibility. // Definition of old types, for backward compatibility.
@ -78,6 +78,8 @@ namespace CGAL {
typedef Dart_index Null_handle_type; typedef Dart_index Null_handle_type;
static Null_handle_type null_handle; static Null_handle_type null_handle;
using Type_for_compact_container=Index_type;
typedef Items_ Items; typedef Items_ Items;
typedef Alloc_ Alloc; typedef Alloc_ Alloc;
template <typename T> template <typename T>
@ -133,7 +135,7 @@ namespace CGAL {
// Init // Init
void init_storage() void init_storage()
{ null_dart_handle=nullptr; } {}
void clear_storage() void clear_storage()
{} {}
@ -421,13 +423,13 @@ namespace CGAL {
void dart_link_alpha(Dart_handle adart, Dart_handle adart2) void dart_link_alpha(Dart_handle adart, Dart_handle adart2)
{ {
CGAL_assertion(i <= dimension); CGAL_assertion(i <= dimension);
CGAL_assertion(adart!=nullptr && adart2!=nullptr); CGAL_assertion(adart!=null_handle && adart2!=null_handle);
mdarts[adart].mf[i] = adart2; mdarts[adart].mf[i] = adart2;
} }
void dart_link_alpha(Dart_handle adart, Dart_handle adart2, unsigned int i) void dart_link_alpha(Dart_handle adart, Dart_handle adart2, unsigned int i)
{ {
CGAL_assertion(i <= dimension); CGAL_assertion(i <= dimension);
CGAL_assertion(adart!=nullptr && adart2!=nullptr); CGAL_assertion(adart!=null_handle && adart2!=null_handle);
mdarts[adart].mf[i] = adart2; mdarts[adart].mf[i] = adart2;
} }
@ -438,12 +440,12 @@ namespace CGAL {
template<unsigned int i> template<unsigned int i>
void dart_unlink_alpha(Dart_handle adart) void dart_unlink_alpha(Dart_handle adart)
{ {
CGAL_assertion(adart!=nullptr && i <= dimension); CGAL_assertion(adart!=null_handle && i <= dimension);
mdarts[adart].mf[i] = adart; mdarts[adart].mf[i] = adart;
} }
void dart_unlink_alpha(Dart_handle adart, unsigned int i) void dart_unlink_alpha(Dart_handle adart, unsigned int i)
{ {
CGAL_assertion(adart!=nullptr && i <= dimension); CGAL_assertion(adart!=null_handle && i <= dimension);
mdarts[adart].mf[i] = adart; mdarts[adart].mf[i] = adart;
} }
@ -459,11 +461,11 @@ namespace CGAL {
/// null_handle /// null_handle
template<unsigned int d_, unsigned int ambient_dim, class Traits_, template<unsigned int d_, unsigned int ambient_dim, class Traits_,
class Items_, class Alloc_, class Index_type_> class Items_, class Alloc_>
typename GMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, Items_, Alloc_, Index_type_>:: typename GMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, Items_, Alloc_>::
Null_handle_type GMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_, Null_handle_type GMap_linear_cell_complex_storage_2<d_, ambient_dim, Traits_,
Items_, Alloc_, Index_type_>:: Items_, Alloc_>::
null_handle((std::numeric_limits<Index_type_>::max)()/2); null_handle((std::numeric_limits<Index_type>::max)()/2);
} // namespace CGAL } // namespace CGAL