Commit Graph

184 Commits

Author SHA1 Message Date
Simon Giraudot c43c6ac2fa Merge remote-tracking branch 'clement/Faster_dd_spatial_searching-cjamin' into Faster_dd_spatial_searching-cjamin 2019-10-22 13:21:53 +02: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
Sébastien Loriot c0edb5ecaa remove CGAL_CXX11 macro usage 2019-07-08 11:42:17 +02:00
Simon Giraudot b2e723b548 Merge branch 'Faster_dd_spatial_searching-cjamin-backup' into Faster_dd_spatial_searching-cjamin 2019-07-04 13:17:50 +02:00
Andreas Fabri 5532b84b4f nullptr_t -> std::nullptr_t 2019-06-05 07:28:56 +02:00
Andreas Fabri e2d19b0c8d Replace NULL and Nullptr_t with nullptr and nullptr_t 2019-06-04 23:45:44 +02:00
Mael Rouxel-Labbé 2848158354 Fix typos 2019-05-20 08:54:04 +02:00
Laurent Rineau 04bef2b071 Merge pull request #3781 from sloriot/CGAL-update_for_cpp14
Update for cpp14
2019-04-08 15:59:28 +02:00
Laurent Rineau 68f321c58d Merge branch 'releases/CGAL-4.13-branch' into releases/CGAL-4.14-branch 2019-04-08 15:58:27 +02:00
Laurent Rineau 34cf27b47e Use std::ptrdiff_t, because the target branch is not C++11
`std::uintptr_t` was introduced by C++11, but the target branch if
CGAL-4.13-branch, does not require C++11.
2019-04-03 14:56:21 +02:00
Laurent Rineau 68f6ebf42d More reinterpret_cast to avoid undefined behavior 2019-04-03 14:52:12 +02:00
Laurent Rineau c54e7c974b Fix AppleClang -Wnull-pointer-arithmetic warning 2019-04-02 10:29:01 +02:00
Sébastien Loriot 3cfbccd44a remove workaround c++11 features in STL_extension 2019-03-29 10:41:49 +01:00
Laurent Rineau 3a8aee198d Concurrent_compact_container uses Time_stamper
- and remove the `CCC_iterator`, in favor of a generic `CC_iterator`.
2018-10-03 17:34:38 +02:00
Mael Rouxel-Labbé 26c857a431 Moved unary/binary_function to CGAL::cpp98 2018-06-13 15:58:19 +02:00
Andreas Fabri 5bc6d78f7f fixes in STL_Extension 2018-04-20 08:53:22 +01:00
Andreas Fabri f0c1d3aab7 more allocator_traits 2018-04-19 14:49:05 +01:00
Laurent Rineau 095c27e2be cosmetic changes 2018-04-17 17:14:19 +02:00
Andreas Fabri 7cbffac35b Deal with deprecated functions allocator<T>::construct/destroy 2018-04-17 13:35:04 +01:00
Andreas Fabri 303b0ab46e Fix detection of CGAL_CXX11 for VC++ and fixes of usage of std::allocator_traits 2018-04-16 11:00:03 +01:00
Andreas Fabri 0cccc34cad Use std::allocator_traits 2018-04-16 08:17:09 +01:00
Andreas Fabri 6c791f161a Triangulation_2 2018-01-17 16:12:12 +00:00
Clement Jamin 8d71d73dc8 Merge remote-tracking branch 'remotes/cgal/master' into Faster_dd_spatial_searching-cjamin 2017-11-17 10:41:54 +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 7e9f756935 Replace all std::unary_function by CGAL::unary_function 2017-10-04 15:57:09 +02:00
Clement Jamin f0a89af33b Merge branch 'Faster_dd_spatial_searching-cjamin-old' into Faster_dd_spatial_searching-cjamin 2017-09-15 11:11:28 +02:00
Guillaume Damiand c8250c4570 Merge branch 'master' into BGL-LCC-gdamiand 2017-06-15 10:03:53 -04:00
Laurent Rineau d1221a6eae Try to fix the segfault
See https://github.com/CGAL/cgal/pull/2072#issuecomment-304310586
2017-06-02 18:08:00 +02:00
Clement Jamin efce74597e The macro has moved to Has_member.h 2017-05-18 11:42:04 +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 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
Guillaume Damiand b375202409 Add a function in compact container to test if a pointer is the first or last element of a block. 2017-03-29 12:45:28 -04:00
Laurent Rineau 7a84cbceea Merge pull request #1509 from gdamiand/Compact_container-add_debug_function-gdamiand
Add index function in Compact container
2016-10-17 10:01:27 +02:00
Guillaume Damiand f034fe2a92 Move assert; it was at the wrong place. 2016-10-06 08:38:57 -04:00
Laurent Rineau 1aefb3b0f3 include <CGAL/config.h>, not <CGAL/basic.h> 2016-09-30 15:23:14 +02:00
Guillaume Damiand 0cf192cd44 Add index function in Compact container (usefull to debug) 2016-09-28 17:14:07 -04: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 0fd6f2fa59 Merge pull request #288 from afabri/CGAL-add_hash-GF
No longer forward declare struct std:hash

Fixes issues #287 and #274.
2015-08-27 15:41:50 +02:00
Andreas Fabri 4183f6ba69 fixed comment 2015-08-23 15:20:19 +02:00
Andreas Fabri bf975ead95 No longer forward declare struct std:hash 2015-08-23 14:30:54 +02:00
Laurent Rineau 08666dce25 Merge pull request #179 from afabri/CGAL-add_hash-GF
Add boost::hash and std::hash

https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/hash

Conflicts:
	Installation/changes.html
2015-07-17 15:39:18 +02:00
Laurent Rineau 25df59411d Merge branch 'releases/CGAL-4.6-branch'
Fix a miscompilation by clang-3.6.x

  https://github.com/CGAL/cgal/pull/161
2015-07-15 17:02:02 +02:00
Laurent Rineau c774546e1b A better fix, using operator->() 2015-07-14 18:02:40 +02:00
Laurent Rineau 2591e6cc7d Fix a miscompilation by clang-3.6.x
Fix issue #139
2015-07-03 17:28:11 +02:00
Guillaume Damiand d67542fb59 Add is_xxx_used in cmap for dart and attributes; add tests in CMap and LCC. 2015-06-22 16:50:56 +02:00
Guillaume Damiand a0b569b83d Remove asserts that avoir to increment/decrement iterators on removed elements. 2015-06-17 09:51:20 +02:00
Guillaume Damiand 25e28a9cf0 Add is_used function (in code and doc) 2015-06-16 12:29:59 +02:00
Andreas Fabri dadb129147 g++ needs a forward declaration for std::hash 2015-06-02 08:46:20 +02:00
Andreas Fabri b6850d35c0 #include <functional> and suppress struct/class warning for VC10 2015-06-01 10:42:52 +02:00
Andreas Fabri 425cdf0b0c derive from unary_function; Add #define switch to hash underlying pointer 2015-05-27 12:19:55 +02:00
Andreas Fabri 6f42513e58 divide by sizeof(pointee) for Compact_container 2015-04-27 13:44:18 +02:00
Sébastien Loriot d36593eb72 add missing const and remove debug output 2015-04-17 17:22:26 +02:00
Andreas Fabri 205a594a77 add specializations of hash and add tests 2015-04-17 10:21:14 +02:00
Andreas Fabri 962ef07812 Add hash_value for Compact_container, Inplace_list, Index 2015-03-12 16:21:56 +01:00
Laurent Rineau 3deb8e7910 Merge branch 'Mesh_3-compare_index-GF-old' into Mesh_3-compare_index-GF
Create an integration branch for 'Mesh_3-compare_index-GF': a new branch
created from 'master', where I merged the previous version of
'Mesh_3-compare_index-GF'.

There was a conflict with two features recently merged into 'master' for
CGAL-4.5:

- the move of two files from include/CGAL/Mesh_3/ to include/CGAL/. See
  the small feature:
    http://cgal.org/wiki/Features/Small_Features/New_constructor_in_Label_mesh_domain_3_and_new_function_wrapper

- parallelism for Triangulation_3 and Mesh_3:
    http://cgal.org/wiki/Features/Parallel_Mesh_3

Conflicts:
	Combinatorial_map/include/CGAL/Cell_attribute.h
	Mesh_3/include/CGAL/Implicit_mesh_domain_3.h
	Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h
	Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h
	Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h
	Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp
	Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp
	Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp
	Polyhedron/demo/Polyhedron/Polyhedron_type.h
	STL_Extension/include/CGAL/Compact_container.h
	STL_Extension/test/STL_Extension/test_Compact_container.cpp

I also modified the following files during the conflict resolution:

	Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h
	Mesh_3/include/CGAL/Labeled_mesh_domain_3.h
	Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h
2014-07-18 15:47:14 +02:00
Andreas Fabri b1f4afbd33 Macros MUST be prefixed with CGAL_
-pedantic does not like extra semicolons

todo:  cleanup: The macro is there twice.
2014-07-09 15:41:08 +02:00
Clement Jamin de485dfc10 Use s_iterator_to and remove the constructor I had added temporarily 2014-05-23 17:17:16 +02:00
Sébastien Loriot 3fa09693a3 Merge branch 'Mesh_3-compare_index-GF-old' into Mesh_3-compare_index-GF
Conflicts:
	Mesh_3/include/CGAL/Mesh_3/Detect_features_in_polyhedra.h
	Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h
	Mesh_3/include/CGAL/Mesh_polyhedron_3.h
	Mesh_3/test/Mesh_3/test_meshing_polylines_only.cpp
	STL_Extension/include/CGAL/Compact_container.h
	STL_Extension/test/STL_Extension/test_Compact_container.cpp
2014-05-21 18:24:17 +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 82f9a83e2d move the Time stamper into a separate file 2014-05-21 12:20:50 +02:00
Clement Jamin f3c00442fd Merge branch 'Mesh_3-parallel-cjamin-old' into Mesh_3-parallel-cjamin 2014-05-14 19:05:40 +02:00
Laurent Rineau bcdfdf5335 Cleanup trailing spaces 2014-04-16 15:42:46 +02:00
Laurent Rineau a2ef3c10f0 Change the name of timestamp policies 2014-04-16 12:36:40 +02:00
Laurent Rineau 1396d65b48 Test the time stamper policy in the testsuite 2014-04-16 12:34:30 +02:00
Laurent Rineau 28e60a5460 Cosmetic changes 2014-04-16 12:33:57 +02:00
Laurent Rineau 36e61bf091 Fix the implementation of CC_ts_impl_aux
CC_ts_impl_aux is the new name of CC_ts_impl_impl
2014-04-16 12:24:14 +02:00
Laurent Rineau cf3eee72ae Add comments 2014-04-16 12:22:49 +02:00
Laurent Rineau 75c61a687d New implementation of Has_timestamp 2014-04-15 18:07:23 +02:00
Jane Tournois 993541644c move Has_timestamp to STL_extension/include/CGAL directory
to avoid that Compact_container depends on Mesh_3
2014-03-27 13:57:47 +01:00
Laurent Rineau b54be0ee3c Update the copyright header 2014-03-25 16:42:23 +01:00
Clement Jamin 157cd0465f Merge branch 'Mesh_3-parallel-cjamin-old' into Mesh_3-parallel-cjamin
Conflicts:
	Mesh_3/demo/Mesh_3/Mesh_3_optimization_plugin_cgal_code.cpp
	Mesh_3/doc/Mesh_3/Concepts/MeshCellBase_3.h
	Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h
	Mesh_3/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h
	Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h
	Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h
	Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h
	Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h
	Mesh_3/include/CGAL/Mesh_3/config.h
	Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h
	Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h
	Mesh_3/include/CGAL/exude_mesh_3.h
	Mesh_3/test/Mesh_3/test_meshing_utilities.h
	Triangulation_3/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h
2014-03-10 17:01:03 +01:00
Jane Tournois 6af720cde8 remove useless typename(s) 2014-02-21 17:14:13 +01:00
Jane Tournois 9d19ac0f96 add a "less" function to CGAL_time_stamper
and handle null pointers given to comparison
it is necessary for example in Triangulation_3::remove_3D
2014-02-21 14:41:41 +01:00
Jane Tournois 22153ac273 make private the time_stamp_ variable
and add time_stamp() and set_time_stamp() methods everywhere
2014-02-20 16:18:49 +01:00
Jane Tournois 0740b3652f add class Has_timestamp not to modify the API of Compact_container
- use the Has_timestamp operator in Compact_container
- add partial specialization to classes that need the time stamp (i.e.
Mesh_vertex_base, Compact_mesh_cell_base_3 and Mesh_cell_base_3)
- remove "ts" from classes where they were actually needed for compilation
purpose only (i.e. Kd_tree_node and Triangulation_ds_cell_base_3)
- rename "ts" to time_stamp_
2014-02-20 15:53:36 +01:00
Jane Tournois b3eccc5905 determinism : add a template parameter to Compact_container
we add a template parameter to Compact_container that is able to
set and get the "time stamps" stored in Vertex_handle, Cell_handle etc.
We previously made sure that these pointers are always compared using
the operator< of CC_iterator, inside Compact_container.h
2014-02-18 17:25:50 +01:00
Jane Tournois 6db28ed43d move ts from Tds to Compact_container
Tds now is back to its original version (not different from master)
2014-02-14 17:15:33 +01:00
Andreas Fabri 83546c53b1 Add a time stamp in vertices and cells of triangulations and polyhedra
and use this for operator< of handles in order to make mesh generation
 deterministic
2014-02-13 19:46:34 +01:00
Clement Jamin c81531bc80 Oops, I removed a line by mistake 2013-12-20 15:11:36 +01:00
Clement Jamin 28c5fde142 Add an increment policy to the Compact_container, and an operator[] 2013-12-20 15:03:37 +01:00
Clement Jamin 5d1eacf16f rename get_erase_counter => erase_counter
And add it to the concept ObjectWithEraseCounter
2013-12-12 07:23:07 +01:00
Andreas Fabri 61298d3925 Fix memory leak in Compact_container::merge()
We forgot to merge all_items
2013-11-08 13:55:40 +01:00
Clement Jamin 2706cbfeff Compact_container: erase counter strategy is now automatically deduced from T.
If the T::increment_erase_counter() function exists, then the erase counter
value will be updated by the Compact_container.
2013-09-30 18:25:41 +02:00
Clement Jamin 6616582b14 Replaced tabs with spaces 2013-03-12 15:40:25 +01:00
Clement Jamin 3eae2927e7 Merge branch 'Mesh_3-parallel-cjamin-old' into Mesh_3-parallel-cjamin 2013-03-04 15:50:57 +01:00
Clement Jamin bce43fbb8e Improved the way parallelism is handle in Mesh_3/Triangulation_3
Added a better support for parallelism in Triangulation_3.
Simplified how to enable/disable concurrency in Mesh_3.
Moved the Compact_container stategies to a new file.
2013-02-15 18:07:43 +01:00
Philipp Möller a9cdb27b78 Remove tautological precondition 2012-12-12 11:28:57 +01:00
Clément Jamin b948543cc6 Use of a Tag (template parameter) to activate/deactivate concurrency in Mesh_3, instead of #ifdef macros. 2012-06-09 08:52:37 +00:00
Clément Jamin 9aefad0454 Added a few comments 2012-03-15 14:59:43 +00:00
Clément Jamin 7137347f95 Added::process_a_batch_of_elements(...) which use parallel_for to insert batch of facets/cells. For now, the body is protected by a scoped_lock to avoid races => no speedup! 2012-03-07 13:57:16 +00:00
Clément Jamin 9ae59efaaf Merge from next 2012-02-15 15:58:17 +00:00
Clément Jamin 4051f03a62 Added a "Strategy" template parameter which allows to optionally add a counter of "erase" (= put on free list) inside each element. 2012-02-13 09:04:24 +00:00
Andreas Fabri cebb7314bc Fix for Windows 'min/max' bug 2012-01-18 11:05:35 +00:00
Sébastien Loriot 91a5327fa8 change LGPLv2 -> LGPLv3 2011-10-10 13:48:25 +00:00
Sébastien Loriot 62a6daf1da add to Compact_container iterator type operators > >= and <= 2011-10-04 11:25:45 +00:00
Laurent Rineau fdd69b61a3 Rename macro of Compact_container to avoid potential future conflict
Add the _COMPACT_CONTAINER_ infix:
  CGAL_INIT_BLOCK_SIZE -> CGAL_INIT_COMPACT_CONTAINER_BLOCK_SIZE
  CGAL_INCREMENT_BLOCK_SIZE -> CGAL_INCREMENT_COMPACT_CONTAINER_BLOCK_SIZE
2011-09-29 14:21:10 +00:00
Guillaume Damiand 71d1d6f56a Add reserve method in compact container (include file, plus ref manual, plus test). 2011-09-27 12:01:42 +00:00