Commit Graph

30 Commits

Author SHA1 Message Date
Maxime Gimeno e9b7595fff Deprecate CGAL headers for threads, atomic and result_of, and move their content to config.h as fallback 2021-05-07 11:09:24 +02:00
Laurent Rineau e82ea5de96 Add move-semantic to Compact_container
That required a refactoring the timestamper feature. And the
explanation why is quite long... Let's do it.

The CGAL triangulations use the `Rebind_TDS` feature. During the
instanciation of `Compact_container<T>` it is important that `T` is
allowed to be incomplete, otherwise the circular dependencies between
TDS and Vertex/Cell cannot be resolved by the compiler. In previous
implementation of the timestamper, to allow `T` to be an incomplete
type, the compact container only carried a *point* to the time
stamper, allocated on the heap. A moved-from compact container would
only be valid if one recreated a time stamper for it on the head in
the move-constructor. As I want move operations to be `noexcept`, I
needed to change that implementation. Now the triangulation always
carries a time stamp counter (`std::size`), independently of the type
`T`, and the time stamper is an empty class, with static methods. That
allows `T` to be incomplete during the declaration of
`Compact_container<T>`.
2020-01-31 11:29:55 +01:00
Laurent Rineau b826770302 Merge pull request #4397 from afabri/T3_accelerate_insert_in_hole
Triangulation_3: Accelerate point insertion
2019-12-17 09:16:35 +01:00
Laurent Rineau c08c632fc8 Merge branch 'releases/CGAL-5.0-branch' into T3_accelerate_insert_in_hole-rebased 2019-12-10 13:02:24 +01:00
Andreas Fabri 29a4f441c9 Shift depends on sizeof(T) not on sizeof(T*) 2019-12-10 12:45:23 +01:00
Laurent Rineau 435bb4d4c4 Cleanup the patch 2019-12-10 10:59:13 +01:00
Andreas Fabri 2edab88f81 variable must be constexpr too 2019-12-10 10:20:14 +01:00
Andreas Fabri 27a93fc25a First cleanup 2019-12-10 10:19:07 +01:00
Andreas Fabri febb607934 WIP: Hard coded appromimated hash function 2019-12-10 10:19:07 +01:00
Mael Rouxel-Labbé 53d4c9b580 Simplify 'Hash_handles_with_or_without_timestamps' (use 'Get_time_stamper') 2019-10-28 11:29:08 +01:00
Sébastien Loriot 52164b1fba First pass on removing license notice in header for LGPL files 2019-10-19 15:40:30 +02:00
Sébastien Loriot 7356421d80 introduce Commercial license SPDX tag 2019-10-19 12:15:19 +02:00
Sébastien Loriot 9bd9c68b83 update LGPL[23]+ and GPL[23]+ SPDX tags
ack -l --no-svg "SPDX-License-Identifier: GPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-3.0+/SPDX-License-Identifier: GPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-3.0+/SPDX-License-Identifier: LGPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: GPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-2.0+/SPDX-License-Identifier: GPL-2.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-2.0+/SPDX-License-Identifier: LGPL-2.0-or-later/"
2019-10-18 21:57:54 +02:00
Andreas Fabri e2d19b0c8d Replace NULL and Nullptr_t with nullptr and nullptr_t 2019-06-04 23:45:44 +02:00
Laurent Rineau 8993817d9d Time_stamper uses an atomic counter 2018-10-03 17:33:45 +02:00
Sébastien Loriot 8cdfad0d08 add missing URL and Id tags 2017-11-15 22:58:57 +01:00
Sébastien Loriot 0698f79aff add SPDX identifier for files under the LGPL-3+ license 2017-11-12 10:17:50 +01:00
Laurent Rineau 74640e8893 The time stamp of the default-constructed CC_iterator can not be 0
`0` is a valid time stamp: that is the time stamp of the first created
`Vertex` or `Cell` of the `TDS_3`. Use the maximal `size_t` instead.
2017-05-31 10:24:38 +02:00
Laurent Rineau 81dccb7d22 Add a macro CGAL_COMPACT_CONTAINER_DEBUG_TIME_STAMP
That macro allows to store the time stamp in the `CC_iterator` (the type
of handle for the triangulation vertices and cells), and check that
handle and pointee have the same time stamp.
2017-05-18 10:57:13 +02:00
Laurent Rineau 6055d226b1 Add an assertion
The assertion checks that two vertex handles have the same time stamp if
and only if they have the same address.
2017-05-18 10:57:13 +02:00
Laurent Rineau e294cd8fe9 Fix new (recycled) time stamps when a TDS is copied 2017-05-18 10:57:13 +02:00
Laurent Rineau 0757cfaeb0 Re-use existing time stamps
When a `Vertex` or a `Cell` is recycled by the `Compact_container`,
re-use the existing time stamp instead of increment it. That will avoid
that the pointee of a handle has a changing timestamp.
2017-05-18 10:57:13 +02:00
Laurent Rineau cb5b3acf98 Class Compare_handles_with_or_without_timestamps to replace hacks
Previously, each file was using its own implementation of the "compare
handle" function object. This commits adds a new class
`Compare_handles_with_or_without_timestamps` that checks the presence of
`Has_timestamp` in the pointed type, and provides a different
`operator()` depending on that.
2017-03-01 12:08:52 +01:00
Andreas Fabri ca6a306815 Rename TimeStamper::key() to hash_value() and let it return a size_t 2016-04-19 17:03:52 +02:00
Laurent Rineau 9176624834 Restore the determinism of Mesh_3
Note that, by default, `Triangulation_3::remove` is not deterministic:
it iterates on a `std::map` (or a `boost::unordered_map`) where the key
type is a triple of vertex handles: the order of that iteration depends
on the comparison (or hashing) of pointers.
2016-04-19 13:56:07 +02:00
Laurent Rineau 333854f38a Fix the license of two files
Trivial fix for master.
2014-07-31 16:19:05 +02:00
Sébastien Loriot 2d14739716 additional fixes for Combinatorial map package 2014-05-21 18:47:33 +02:00
Sébastien Loriot 1bffc44ed4 factorize the mecanism to define the time stamper in a container 2014-05-21 16:30:32 +02:00
Sébastien Loriot c6fa3f4a3a add missing namespace 2014-05-21 12:51:20 +02:00
Sébastien Loriot 82f9a83e2d move the Time stamper into a separate file 2014-05-21 12:20:50 +02:00