Commit Graph

486 Commits

Author SHA1 Message Date
Jane Tournois 88666391da introduce weighted_circumcenter() for RegularTriangulationCellBase_3
weighted_circumcenter() replaces circumcenter() in the regular framework,
which is not a member of TriangulationCellBase_3 anymore.

Triangulation_cell_base_with_circumcenter_3 is deprecated and replaced by:
Delaunay_triangulation_cell_base_with_circumcenter_3
and
Regular_triangulation_cell_base_with_circumcenter_3.

Implement the changes in documentation, Triangulation_3 code and Mesh_3 code.
2014-01-16 16:55:19 +01:00
Jane Tournois 7b55c30ba5 fix the use of Triangulation_cell_base_with_circumcenter
Triangulation_cell_base_with_circumcenter should not be responsible for
computing the circumcenter value. It is only responsible for its caching.
The Cell_base used as second template parameter should make the construction,
in the circumcenter() function.

Also fix the order of derivation in Mesh_cell_base_3
2014-01-10 14:31:02 +01:00
Jane Tournois bf9e964f0e remove macro CGAL_REGULAR_TRIANGULATION_3_USE_CIRCUMCENTER_CACHE
has been checked and is always activated
2014-01-09 12:05:50 +01:00
Jane Tournois 88eddc7e8b Merge branch 'Triangulation_3-regular_cell_base_with_circumcenter-GF-old' into Triangulation_3-regular_cell_base_with_circumcenter-GF 2014-01-03 18:03:01 +01:00
Olivier Devillers d8197fb718 merge master and Triangulation 2013-11-29 13:40:14 +01:00
Clement Jamin 6b65ad71da Changes in the "lock data structure" concept and models
The concept is now much more generic (SurjectiveLockDataStructure).
The names have been changed accordingly.
2013-10-16 12:17:56 +02:00
Clement Jamin 5101c3d2e7 Added my name in a few places + implementation history 2013-10-15 11:14:58 +02:00
Clement Jamin 29525dfcb7 Back-quotes for could_lock_zone and true + minor fixes + replace 0 by NULL 2013-10-15 10:27:35 +02:00
Laurent Rineau 240385d011 Add expensive assertions to check the circumcenter cache 2013-10-14 17:12:54 +02:00
Clement Jamin 88ed4cc924 Removed strategies in T3 benchmark and Dummy TDS 2013-10-01 17:27:21 +02: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 2944261214 Merge branch 'Mesh_3-parallel-cjamin' of ssh://scm.cgal.org/var/git/cgal into Mesh_3-parallel-cjamin 2013-09-25 10:50:46 +01:00
Clement Jamin 41929ed520 Merge branch 'Mesh_3-parallel-cjamin-old' into Mesh_3-parallel-cjamin
Conflicts:
	Mesh_3/doc/Mesh_3/Concepts/MeshCellBase_3.h
	Mesh_3/dont_submit
	Triangulation_3/doc/TDS_3/CGAL/Triangulation_data_structure_3.h
	Triangulation_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h
	Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h
	Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h
	Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h
	Triangulation_3/doc/Triangulation_3/PackageDescription.txt
2013-09-25 11:47:43 +02:00
Clement Jamin a173372321 Fixes for GCC + removed trailing spaces 2013-09-25 11:18:18 +02:00
Andreas Fabri 5c454cec64 add missing includes 2013-09-13 12:43:01 +02:00
Sébastien Loriot ded66799a6 make the insertion of a range of points with info working with hierarchy 2013-08-05 15:03:46 +02:00
Clement Jamin 18895e6f42 Use the TBB's scalable allocator in a few places
=> better scalability of the parallel remove
2013-07-23 17:51:06 +02:00
Clement Jamin fc10668b31 Spelling mistake + minor change 2013-07-23 17:17:38 +02:00
Marc Glisse 530f20179c Finish Philipp's patch on initializing arrays. 2013-07-23 15:58:04 +02:00
Clement Jamin 8aaee67985 Removed some "p_" prefixes in variable names 2013-07-12 15:49:45 +02:00
Clement Jamin 09d75308fb Untabify 2013-07-02 18:16:22 +02:00
Clement Jamin 206b20bc15 Merge branch 'Mesh_3-parallel-cjamin-old' into Mesh_3-parallel-cjamin 2013-07-02 17:37:50 +02:00
Clement Jamin fcdf906f06 Option to add temporary points on a far sphere before insertion
Helps to reduce contention on the infinite vertex
But removing those points in the end takes time
so it's only worth it when points lie on a surface.
2013-07-02 12:57:26 +02:00
Clement Jamin 8181587ed7 Fix tabs + better profiling 2013-07-02 11:37:32 +02:00
Clement Jamin 2dc6c405b8 Drop the use of the TBB malloc proxy, use TBB allocators manually instead
The TBB's "malloc proxy", which allows to replace all calls to the standard
allocators by calls to the TBB scalable allocator, is not available on MacOS.
Instead, we use the TBB allocators manually, where relevant.
2013-06-27 15:29:47 +02:00
Jane Tournois 404f2e0e3c merge 2013-06-21 10:01:19 +01:00
Clement Jamin bc360c8b13 Changes for GCC compilation + removed some trailing spaces 2013-06-07 17:40:53 +02:00
Clement Jamin 440a654a58 Added a concurrency-safe version of DT3::find_conflicts + better doc 2013-06-05 17:23:19 +02:00
Clement Jamin b43f28c6ab Renamed p_could_lock_zone + use NULL instead of 0 + CGAL_TRIANGULATION_3_PROFILING 2013-06-05 13:44:34 +02:00
Clement Jamin dbe1c9c597 Reversed the "facet_not_in_its_cz" variables by removing the "not" 2013-05-28 15:56:22 +02:00
Clement Jamin eeeb6cc841 Smaller tag names (continued) 2013-05-28 15:42:39 +02:00
Clement Jamin 127926aa14 Proof-reading + minor changes
Renamed unlock_all_tls_locked_locations => unlock_all_points_locked_by_this_thread
2013-05-28 15:07:20 +02:00
Clement Jamin 9aefdbe939 Replaced is_base_of by is_convertible. 2013-05-23 17:49:24 +02:00
Clement Jamin c471fb442d Untabify + removed useless spaces 2013-05-21 11:13:36 +02:00
Sébastien Loriot 8d602ed8c2 Merge branch 'triangulation_3-copy_tds-sloriot'
Approved by the release manager

Conflicts:
	Alpha_shapes_3/test/Alpha_shapes_3/copy_tds.h
	Triangulation_2/doc/TDS_2/Concepts/TriangulationDataStructure_2.h

it introduces a more general copy_tds that allows to copy tds with different types of simplices.
2013-04-29 11:09:01 +02:00
Laurent Rineau 76da6cf570 Add missing #include
That fixes the compilation when no <CGAL/Gmp*.h> header is included.
2013-04-24 12:57:57 +02:00
Sébastien Loriot 0beb1a8861 add an extra overload to please MSVC 2013-04-19 08:38:56 +02:00
Clement Jamin 3a4caaaa1c Changed the place of the erase counters.
Changed Compact_container_strategy_XXX::Uses_erase_counter type + moved the erase counters from Triangulation_ds_xxx_base_3 to Mesh_xxx_base_3.
2013-04-16 15:31:36 +02:00
Sébastien Loriot 498492e770 add set_infinite_vertex to Triangulation_3 and use it with copy_tds
the 2D version already exists
2013-04-12 16:04:59 +02:00
Sébastien Loriot f9e0c97aac for convenience add a default to simple converter
it is useful if you want to copy the tds of a familly
alpha-shape into a fixed one
2013-04-11 20:03:32 +02:00
Jane Tournois 7a530ea7d8 remove just_incident_cells.
The bench I made did not show that it provided any computation time improvement.
2013-04-11 12:48:04 +02:00
Clement Jamin 2a7c402c07 Regular_triangulation_3 is now parallel (insert/remove) 2013-04-10 18:08:53 +02:00
Clement Jamin 6a85889a1e New constructor + minor changes 2013-04-10 18:07:14 +02:00
Clement Jamin ef756afafd Missing "dummy function" for the sequential case 2013-04-03 17:35:24 +02:00
Clement Jamin 1cc98e9abd Updated doc + code clean-up 2013-04-03 17:34:21 +02:00
Clement Jamin e6b33376bb Avoid multiple calls to tbb::enumerable_thread_specific::local() 2013-03-29 17:16:26 +01:00
Clement Jamin 4399f8218b Untabify (missed some of them last time) 2013-03-28 10:13:32 +01:00
Clement Jamin 8c19195bcb Untabify 2013-03-27 15:32:10 +01:00
Clement Jamin cc9dde002e Untabify 2013-03-27 15:30:46 +01:00
Clement Jamin c3e9699887 Clean-up + better "profiling" 2013-03-27 14:39:10 +01:00
Clement Jamin de1f43e30b The remove is now fully parallel.
The remove operations are done in parallel as long as the dimension stays = 3, then the few remaining points are removed sequentially.
2013-03-27 13:47:40 +01:00
Clement Jamin 57d84ecb24 New constructor for Tri_3 and TDS + new way of testing "dim down" in the 3D case
New constructor taking 4 non-coplanar vertices, for faster construction of very small triangulations => a 3D triangulation is directly constructed.
The new "test_dim_down_using_incident_cells_3" is used in the 3D and will be used by the parallel version.
2013-03-26 19:00:37 +01:00
Jane Tournois 35120cdf53 small feature documentation about inexact_locate 2013-03-22 15:46:38 +01:00
Andreas Fabri 7bd3e3698e use CGAL::compare instead of compare to avoid Koenig lookup 2013-03-15 17:34:53 +01:00
Clement Jamin b83b159c2f Fix so that we don't require xx_erase_counter functions anymore when sequential 2013-03-14 17:45:19 +01:00
Clement Jamin 1f0e994a00 Renamed a few functions + tabs to spaces conversion + benchmark output + minor changes 2013-03-11 15:46:27 +01:00
Clement Jamin a7cfd06598 Replaced the unused pair<bool,int> returned by try_lock by a simple bool. 2013-03-08 16:47:37 +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 a8d38a5fed Code clean-up 2013-02-28 19:46:06 +01:00
Laurent Rineau bc7e2a1d71 Merge remote-tracking branch 'origin/Mesh_3-improvements-GF' into Mesh_3-improvements-GF-new
Mesh_3-improvements-GF-new is fresh fork of master

Conflicts:
	.gitattributes
	AABB_tree/include/CGAL/AABB_tree.h
	GraphicsView/src/CGAL_Qt4/DemosMainWindow.cpp
	Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h
	Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h
	Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h
2013-02-28 17:10:16 +01:00
Laurent Rineau bd0930fc26 Fix segfaults in T3, caused by the use of CGAL_assume
I wonder why the compiler created buggy code. Anyway, I found easy
workarounds, without reintroducing the warnings.
2013-02-22 16:15:04 +01:00
Laurent Rineau 66c5d23154 Use CGAL_assume to remove warnings 2013-02-20 18:55:43 +01:00
Clement Jamin a29a847e55 Some tests with parallel removal of vertices. 2013-02-20 17:39:15 +01:00
Clement Jamin 44b8217d54 New/modified constructors for triangulations.
Can now take a lock data structure as parameter.
2013-02-19 10:39:39 +01:00
Clement Jamin 864f4eca81 Moved Spatial_grid_lock_data_structure_3.h to STL_Extension 2013-02-18 13:09:12 +01:00
Clement Jamin 8d5352e15f Better grid lock data structure.
There is just one grid lock data structure class now, with several specialization.
Moreover, now the type of the lock data structure is only defined in the triangulation.
2013-02-18 12:58:57 +01:00
Clement Jamin 0c80db26d4 Forgot to remove an #include 2013-02-18 11:16:45 +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
Andreas Fabri 8b5b56adb1 make index an unsigned int 2013-02-15 11:30:08 +01:00
Clement Jamin eb2ed63d8b Changed the way we activate concurrency in Triangulation_3 + Code clean-up 2013-02-11 19:12:30 +01:00
Laurent Rineau 70bf8d7e88 New branch to add c->circumcenter (and the verson with cache) to RT3 2013-02-07 19:07:42 +01:00
Andreas Fabri afeea1e124 replace size_t with int in loops over the vertices of a cell 2013-02-07 17:26:32 +01:00
Clement Jamin c4859681e3 Removed the "localization ids" related code.
It was an old, unused and slow.
2013-02-06 18:57:36 +01:00
Clement Jamin cb89562205 Removed the CGAL_MESH_3_ACTIVATE_GRID_INDEX_CACHE_IN_VERTEX macro.
It was buggy and useless.
2013-02-06 18:10:35 +01:00
Clement Jamin 5938113aff Moved some code because there was a problem with some #ifdef 2013-02-06 14:30:04 +01:00
Clement Jamin dc5e90b8cc Clean-up + some debugging functions + comments 2013-02-02 06:53:43 +01:00
Clement Jamin 2ee92ca346 Missing #ifdef 2013-01-30 17:30:31 +01:00
Clement Jamin ad4a9dcaf6 New is_element_locked_by_this_thread for testing purposes 2013-01-29 19:03:07 +01:00
Clement Jamin 7af597cb4f Parallel Mesh_3 can now be compiled with GCC 2013-01-17 14:49:04 +01:00
Clement Jamin 3dd7981cf4 The erase counter in vertex_base is only required for the parallel version. 2013-01-15 17:05:24 +01:00
Clement Jamin 44e91351ce Code clean-up + minor changes/optimizations 2013-01-11 16:40:03 +01:00
Clement Jamin 7efd61b6db Removed some data race conditions in the parallel perturber.
Note: the code needs some clean-up
2013-01-08 08:59:17 +01:00
Sébastien Loriot aeb1edeae8 Merge branch 'triangulation_3-copy_tds-sloriot-old' into triangulation_3-copy_tds-sloriot 2012-12-18 19:57:32 +01:00
Sébastien Loriot 7843d7ce20 using internal::TDS_3 namespace 2012-12-17 16:39:04 +01:00
Clement Jamin dc7096b1e5 This parallel version of the Perturber seems much better. Needs to be tested... 2012-12-13 20:39:37 +01:00
Philipp Möller 3e98c46535 Correct syntax for uniform initialization 2012-12-12 11:24:34 +01:00
Philipp Möller ae1b135c54 Replace usage of CGAL_CFG_ARRAY_MEMBER_INITIALIZATION_BUG 2012-12-11 17:46:14 +01:00
Sébastien Loriot c25f925174 renaming functor in copy_tds 2012-12-05 12:43:54 +01:00
Sébastien Loriot 6152194fa8 remove boolean for first vertex 2012-12-05 12:43:54 +01:00
Sébastien Loriot 47fea6c6f1 merge experimental-packages/Triangulation_3_copy_tds to a proper branch 2012-12-05 12:43:53 +01:00
Clement Jamin 9c5cddbbc3 Global optimizers: better parallel performance
- We used to have a thread-local variable for cell::TDS_data to make
  incident_cells concurrently callable but it was slow and memory-consuming
  => new incident_cells function which do not use cell::TDS_data
  => faster and lighter
- update_restricted_delaunay now uses parallel_for instead of parallel_do
  (it was quite slow with the implicit oracle)
  => faster (but requires to fill a temporary vector)
2012-11-28 14:17:59 +01:00
Clement Jamin 11a2a1c68a Merge from Mesh_3-improvements-GF 2012-11-21 17:49:59 +01:00
Clement Jamin ab4d97c1e5 The global optimizers are now parallel (needs some intense testing now) 2012-11-21 16:16:47 +01:00
Clément Jamin ffc70d4482 Added support for concurrency to "locate" + minor changes 2012-11-20 15:16:21 +01:00
Laurent Rineau 57a58d00a3 Triangulation_cell_base_with_circumcenter_3::invalidate_circumcenter() must
be public.

That is required by the slivers exuder.
2012-11-20 10:25:47 +01:00
Laurent Rineau 4509b5bbe2 Merge branch 'master' into improvements
Conflicts:
	Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h
2012-11-14 12:17:29 +01:00
Sébastien Loriot 825bfe6144 make create_star_3 non recursive only after 100 recursive calls.
The speed observed on random data set produced by simple_2.cpp is equivalent
to the original recursive version and faster than the version better this commit
2012-10-30 13:42:47 +00:00
Clément Jamin 74fad3a088 Typo 2012-10-19 08:50:18 +00:00
Clément Jamin 8a12c83451 The parallel version can now use safely FORCE_STRUCTURAL_FILTERING (optimization from GF-Improvements) 2012-10-17 16:33:37 +00:00
Clément Jamin 1ca7174e01 Merge from Mesh_3-improvements-GF
+ some bugfixes (most of them are related to the parallel version)

This version works (sequential and parallel) as long as the following macros are NOT defined:
* CGAL_COMPACT_MESH_VERTEX_CELL
* CGAL_INTRUSIVE_LIST
* FORCE_STRUCTURAL_FILTERING
2012-10-16 14:02:16 +00:00
Clément Jamin 4e1f8aa4f8 Merge from next 2012-10-15 08:28:01 +00:00
Laurent Rineau 795c71fc9b Fix headers of Mesh_2 and Mesh_3. All were missing #include.
I found out that way that <CGAL/Mesh_3/Refine_facets.h> and
<CGAL/Mesh_3/Protect_edges_sizing_field> were using global functions
instead of functors of the traits class.

Note also the funny bug that <CGAL/Regular_triangulation_cell_base_3.h> was
depending on <CGAL/Triangulation_vertex_base_3.h>!
2012-10-08 09:33:38 +00:00
Clément Jamin 2366fee1e1 Merge from next 2012-09-28 14:51:02 +00:00
Jane Tournois 3555cf3cb2 make just_incident_cells_3 the default use of incident_cells(v)
replace macro CGAL_JUST_INCIDENT_CELLS with CGAL_TDS_3_NOT_JUST_INCIDENT_CELLS (and reverse use), and comment it in config.h
2012-08-28 09:01:47 +00:00
Jane Tournois abc1515741 r70387, r70573, r70574 from Mesh_3-experimental-GF
Add incident_cells_3(Vertex_handle, std::vector<Cell_handle>)

This function avoids the construction of two additional std::vectors.
The performance gain is between 30% (g++) and 50% (VC++)
for points on surfaces as well as for points filling space.

We at the same time change the implementation of the function
incident_cells(Vertex_handle, OutputIterator).
In order to save one additional std::vector,
the cells are reported in bfs and not in dfs order
2012-07-31 14:44:45 +00:00
Jane Tournois 7d169b85f8 r70573 from Mesh_3-experimental-GF
add macro to force Structural_filtering
2012-07-31 14:14:25 +00:00
Jane Tournois db9f968ea9 r70321 from Mesh_3-experimental-GF
Change inexact_locate and inexact_orientation from protected to public (needed for the commit in Mesh_3 concerning inexact_locate in Mesh_sizing_field)
2012-07-31 13:30:29 +00:00
Samuel Hornus 2223726370 merge from next 2012-07-18 15:42:06 +00:00
Clément Jamin 1c664776c9 The parallel version can now be built with GCC 2012-07-10 16:53:34 +00:00
Clément Jamin 41f9cbe411 Sequential Mesh_3 can now be compiled by GCC. 2012-07-09 15:44:58 +00:00
Philipp Möller caf3cce0d1 Silence unused parameter warnings. Leave the ones from the test-suite
that could signal incomplete tests.
2012-06-22 14:22:16 +00:00
Clément Jamin 40f602fea9 Minor changes (comments, etc.) 2012-06-21 12:03:03 +00:00
Clément Jamin 3725168185 Backup commit (I need to roll back to an older version) 2012-06-15 11:28:09 +00:00
Clément Jamin b268598665 Replace LINKED_WITH_TBB by CGAL_LINKED_WITH_TBB. 2012-06-13 09:33:08 +00: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 dfbddff185 Bugfixes + some clean-up 2012-05-30 14:49:02 +00:00
Olivier Devillers 576e7338c5 merge next 2012-05-24 09:20:13 +00:00
Clément Jamin 5a628edd4e - New worksharing technique: we use a coarse version of the mesh to split the space.
- Some clean-up (removed g_global_mutex)
2012-05-03 16:05:36 +00:00
Clément Jamin 0eee3dc040 Fixed a deadlock introduced recently.
Added some assertions in the way...
2012-04-25 13:00:12 +00:00
Clément Jamin 7d1d94f42e Merge from next 2012-04-24 16:24:13 +00:00
Laurent Rineau 5acc79e554 Add comments to explain what happens with the use of Default Dt_3 2012-04-23 16:54:47 +00:00
Clément Jamin 4adf775814 Bugfix for sequential Mesh_3 using lazy refinement queue. 2012-04-13 15:18:22 +00:00
Clément Jamin 9933dd83a4 - Some clean-up: moved global variables (locking/worksharing data structures) to member variables of Mesher_3.
- Some tests on the worksharing strategies
2012-04-12 08:33:43 +00:00
Clément Jamin 69272e4d9a Test with a worksharing strategy (based on TBB task scheduler) + test with parallel_do. 2012-04-10 13:23:51 +00:00
Clément Jamin a0a92cdf64 The problem "A facet is not in conflict with its refinement point" (can occur in sequential version too) is now solved => we switch to exact computation (for the dual) when it happens.
Note: don't try to #define CGAL_MESH_3_DO_NOT_LOCK_INFINITE_VERTEX, it doesn't work yet.
2012-04-04 07:05:46 +00:00
Laurent Rineau 95bec3999c Use Unique_has_map instead of std::map (patch from Andreas Fabri)
The gain on copies of T2 or T3 is the following:


afabri@klimt /cygdrive/c/cgal/next/Triangulation_3/benchmark/Triangulation_3
$ ./copy 1000000 2
36.806 sec

afabri@klimt /cygdrive/c/cgal/next/Triangulation_3/benchmark/Triangulation_3
$ ./copy 1000000 2
4.865 sec

The benchmarck copy.cpp is the following (not commited):

#define  CGAL_T3_HASH
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Timer.h>
#include <CGAL/point_generators_3.h>


#include <iostream>
#include <fstream>
#include <string>
#include <vector>

typedef CGAL::Exact_predicates_inexact_constructions_kernel  K;
typedef CGAL::Delaunay_triangulation_3<K> Delaunay;
typedef K::Point_3                                     Point;
typedef CGAL::Creator_uniform_3<double,Point>  Creator;



int main(int argc, char **argv)
{
  int n=1000000;
  int rep=100;
  if (argc>=2)
    n=atoi(argv[1]);
  if (argc>=3)
    rep=atoi(argv[2]);
  std::vector<Point> points;
  points.reserve(n);  
  CGAL::Random_points_in_sphere_3<Point,Creator> g(1);
  CGAL::copy_n( g, n, std::back_inserter(points));
  Delaunay original;
  original.insert(points.begin(),points.end());
  
  double res = 0;
  for (int r=0;r<rep;++r){
    CGAL::Timer t;    t.start();
    Delaunay delaunay=original;
    t.stop();
    res+=t.time();
  }

  std::cout << res << std::endl;
            
  return 0;
}
2012-03-30 12:37:19 +00:00
Clément Jamin a520f3cbf0 Corrected a rare race condition.
The few bad facets that are created during the "cell refinement" step are treated immediately inside the thread which created them.
2012-03-29 15:05:28 +00:00
Clément Jamin 4fdf647428 "Re-tabulation" 2012-03-28 08:30:32 +00:00
Clément Jamin a3f27eff3c Finally, a fully parallel version of the refinement. Not very efficient, though, but the idea was to identify all data races and to protect it using locks, atomics, TLS... Needs some tests now, to check if we didn't miss any rare data race. 2012-03-26 07:39:58 +00:00
Clément Jamin da923ba811 Forget about yesterday. There was a studid mutex making the whole thing nearly sequential.
Anyway, now the refinement of the facets is parallel. The speedup is around 2-3 on a 12-core CPU. Can do better, but at least it shows it's not sequential.
The refinement of the cells is not parallel, yet.
One last thing: the program needs to be restarted between two refinements (should be fixed soon).
2012-03-23 18:05:24 +00:00
Clément Jamin 4ccf8e0447 First working parallel version. It's not faster than the sequential one, but not slower neither (depends if you're optimistic or not). The good news is that we found all (?) the sections to protect or to make thread-local. 2012-03-22 17:07:03 +00:00
Clément Jamin 9ae59efaaf Merge from next 2012-02-15 15:58:17 +00:00
Clément Jamin d284cf0e22 Lazy removal of cells from the refinement queue 2012-02-13 11:47:24 +00:00
Sébastien Loriot 498c0a6e1e Make the insert-by-range function more permissive
The condition is now to be convertible to the point type, pair<point,info>,...
This was the behavior before the insert-by-range-with-info methods were
introduced.
2012-01-24 17:25:20 +00:00
Clément Jamin 677190c9ec merge from next 2012-01-17 15:26:27 +00:00
Clément Jamin 5c19245264 Merge from next 2012-01-16 19:38:35 +00:00
Laurent Rineau 8f59fd9592 Turn QPL into LGPLv3+ 2012-01-13 16:33:35 +00:00
Laurent Rineau 7df0200a6b Reintegrate /branches/features/Power_test_3-VC_64bit-GF into next. 2011-11-17 17:11:42 +00:00
Laurent Rineau 3089c5d022 Revert that patch. Andreas agreed that he should not have commited that to
next before the branch ShewchuckKernel-GF is tested in candidates

Reverted commit:
  | ------------------------------------------------------------------------
  | r66076 | afabri | 2011-10-26 21:29:58 +0200 (Wed, 26 Oct 2011) | 1 line
  | Changed paths:
  |    M /branches/next/Triangulation_3/include/CGAL/internal/Static_filters/Power_test_3.h
  | 
  | Split the operator in two functions to avoid an ICE for VC++ 64bit release compilations
  | ------------------------------------------------------------------------
2011-10-27 13:57:12 +00:00
Andreas Fabri 1c055d6951 Split the operator in two functions to avoid an ICE for VC++ 64bit release compilations 2011-10-26 19:29:58 +00:00
Olivier Devillers bb02600abb better predicates in triangulation traits 2011-10-19 12:43:10 +00:00
Andreas Fabri 706e98cd3b Workaround for ICE on VC++ generating 64bit code 2011-10-14 13:04:06 +00:00
Laurent Rineau b7c33d7b2e Add a comment to mark the end of move_if_no_collision
The function body of Triangulation_3<Gt,Tds>::move_if_no_collision is so
long that comments should be added to mark blocks ends. For now, mark the
end of the function body.
2011-08-24 13:39:51 +00:00
Laurent Rineau 1fb7632ec3 Fix a bug in finite_adjacent_vertices when dimension()==1.
When tr.dimension()==1, tr.finite_adjacent_vertices(...) and
tr.finite_incident_edges(...) returned infinite things.
2011-07-28 16:53:11 +00:00
Andreas Fabri e8fb926dae Add missing return statements 2011-06-29 14:19:27 +00:00
Sébastien Loriot cc9929b7de qualify boost::bind to avoid ambiguity on windows. 2011-06-08 06:36:55 +00:00
Sébastien Loriot 98ddbf9c7e merge packages Spatial_sorting, Triangulation_2 and Triangulation_3 from branch spatial_sorting-add_info-sloriot 2011-05-24 15:48:31 +00:00
Sébastien Loriot 2c2ce21536 remove commented lines from example.
int -> size_type
2011-03-04 07:12:17 +00:00
Sébastien Loriot c1ff39de9a fix documentation from branch (code merged in r60697) 2011-02-28 17:22:38 +00:00
Andreas Fabri be782ec8e3 Use CGAL::abs instead of fabs 2011-02-16 15:53:26 +00:00
Laurent Rineau a2daef39ab Add a comment, that explain a tricky line of code.
(Actually, seeing the code, I first thought there was a bug. But then I
understood. That is why I think the comment may be is helpful for others).
2011-02-11 10:43:45 +00:00
Laurent Rineau 7e1f88e0cb Abort operator>> as soon as one of the error flags failbit or badbit is set
on the stream. That avoids a possible very long loop if the stream format
is not the excepted one (imagine that is >> n sets n to INTMAX...)
2011-02-08 16:13:38 +00:00
Sébastien Loriot 68c3dfbfa9 add missing default constructor 2011-02-07 11:11:10 +00:00
Sébastien Loriot af6f99ed1a protect code using insert points with info by range using macro
CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
2011-01-10 17:54:57 +00:00
Sébastien Loriot 3181ed9401 merge only the code to insert points with info by range from the branch
/branches/experimental-packages/Triangulation_insert_with_info/Triangulation_3
2011-01-10 16:00:51 +00:00
Laurent Rineau eea1755591 Merge the candidate branch of
https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Rt::vertices_inside_conflict_zone
in trunk.
2010-12-21 16:36:04 +00:00
Laurent Rineau 96162627aa Merge the following small features in trunk:
https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Remove_cluster
  https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Structural_filtering

Merge also a partial support of:
  https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Rt::vertices_inside_conflict_zone
    (vertices_inside_conflict_zone" is added in Regular_triangulation_3,  without documenting it)
2010-12-10 17:02:10 +00:00
Sébastien Loriot dfa20899ef derecursion of create_star_3:
I remade a benchmark and finally when using boost::thread_specific_ptr,
using a std::vector is faster than the dedicated vector-class I previously
use.
I also retry using a tuple instead of a dedicated class to store variables
useful for the emulated recursion but tuple is (on my machine) slower.

benchmark results are the following (points are randomly taken in a sphere,
time is in seconds and is the mean of 10 idendical runs)

nb points              |   1000        100000    100000    1000000   10000000
-----------------------------------------------------------------------------
trunk version          | 0.0088       0.0928     0.9865    10.216     102.99 
with vector            | 0.0096       0.0900     0.9817    10.075     102.24 
with vector and tuple  | 0.0100       0.0948     0.9981    10.219     104.58 
recursive version      | 0.0080       0.0936     0.9732    10.141     102.33
2010-11-24 07:27:04 +00:00
Laurent Rineau 77a2bead80 Add missing svn properties (keywords and eol-style). 2010-09-20 12:12:46 +00:00
Stéphane Tayeb ca4f9f11e8 Add an overload of insert_in_hole() in class Regular_triangulation_3 to ensure that hidden points are properly treated. 2010-08-04 15:36:38 +00:00
Sylvain Pion 8bd594a8be Simplification : the case dim==1 should work for dim==0 as well. 2010-07-27 12:55:09 +00:00
Sylvain Pion fdd4243639 nearest_vertex_in_cell() : handle dimension == 0. 2010-07-27 12:48:53 +00:00
Sébastien Loriot 599b23129e missing using 2010-07-08 09:04:57 +00:00
Stéphane Tayeb 771b6f1b79 Fix bug on g++-4.5 -std=c++0x: use int[3] instead of unsigned char[3] to store vertex indices. 2010-07-07 11:26:48 +00:00
Sébastien Loriot 9567810ef8 add macro CGAL_TDS_USE_OLD_CREATE_STAR_3 in TDS_3.h so that user can
still use the old recursive version of create_star_3.
2010-06-28 14:06:14 +00:00
Sébastien Loriot 238f5a8479 change a private into protecter to have access to hidden_tester in derived class
add a using find_conflicts so that can call T3 version from class inheriting from DT or RT
2010-06-25 21:13:06 +00:00
Sébastien Loriot bb39c7d194 bug in Facet_extractor: missing * and ++ 2010-06-25 12:58:37 +00:00
Laurent Rineau 0625b6c6bd int -> std::size_t|size_type 2010-06-24 13:27:44 +00:00
Andreas Fabri 1e12152c5f int size_t fixes 2010-06-24 12:50:37 +00:00
Andreas Fabri d185e4152f Finally use ptrdiff_t as return type for insert(beg, end) 2010-06-23 13:35:35 +00:00
Andreas Fabri b456cdb994 int -> size_type/std::size_t 2010-06-21 20:31:19 +00:00
Andreas Fabri 97c2754da5 As the insertion of points in a regular triangulation can reduce the number of vertices we have to replace size_t with ptrdiff_t 2010-06-21 16:06:01 +00:00
Andreas Fabri f555a82e17 int -> size_type/std::size_t 2010-06-21 14:16:24 +00:00
Andreas Fabri c79a1ebbf6 int -> size_type/std::size_t 2010-06-21 14:12:02 +00:00
Laurent Rineau 8679a3911e Merged revisions 56835,56864-56870,56876,56895-56897 via svnmerge from
svn+ssh://lrineau@scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.6-branch

........
  r56835 | lrineau | 2010-06-17 12:56:52 +0200 (Thu, 17 Jun 2010) | 6 lines
  
  Remove the constructor Gmpfr(long double) on Microsoft Visual C++. A big
  comment in the source code explains why.
  
  The testsuite will check that the construction of Gmpfr from a long double
  on MSVC still works and produces the right Gmpfr.
........
  r56864 | afabri | 2010-06-18 11:04:47 +0200 (Fri, 18 Jun 2010) | 1 line
  
  Use tie from boost::
........
  r56865 | afabri | 2010-06-18 11:11:49 +0200 (Fri, 18 Jun 2010) | 1 line
  
  Use bind from boost::
........
  r56866 | afabri | 2010-06-18 11:38:50 +0200 (Fri, 18 Jun 2010) | 1 line
  
  Use bind from boost:: (detected in Mesh_3 VC10 testsuite)
........
  r56867 | lrineau | 2010-06-18 11:39:24 +0200 (Fri, 18 Jun 2010) | 3 lines
  
  cmake-2.8.2rc2 is out.
  /bigobj is necessary
........
  r56868 | afabri | 2010-06-18 11:52:37 +0200 (Fri, 18 Jun 2010) | 1 line
  
  Add #include <fstream>
........
  r56869 | afabri | 2010-06-18 11:55:33 +0200 (Fri, 18 Jun 2010) | 1 line
  
  Shorten filename as with path it exceeds easily 256 letters which poor Visual C++ can't handle
........
  r56870 | afabri | 2010-06-18 12:24:30 +0200 (Fri, 18 Jun 2010) | 1 line
  
  Use tie from boost::
........
  r56876 | lrineau | 2010-06-18 16:40:36 +0200 (Fri, 18 Jun 2010) | 3 lines
  
  New try to fix the issue of Gmpfr(long double) with MSVC and libmpfr-1.dll
  compiled by Mingw.
........
  r56895 | lrineau | 2010-06-20 23:16:40 +0200 (Sun, 20 Jun 2010) | 3 lines
  
  Using boost::bind is not sufficient" "bind" without qualifier was
  ambiguous, according to MSVC2010, with std::bind (from C++0x).
........
  r56896 | lrineau | 2010-06-20 23:18:29 +0200 (Sun, 20 Jun 2010) | 3 lines
  
  Qualify "bind" with "boost::", to avoid the ambiguity (according to
  MSVC2010), with std::bind (C++0x).
........
  r56897 | lrineau | 2010-06-20 23:19:17 +0200 (Sun, 20 Jun 2010) | 2 lines
  
  Stupid typo!
........
2010-06-20 21:48:20 +00:00
Sébastien Loriot 4d0e30fd74 add comments 2010-06-16 15:04:30 +00:00
Sébastien Loriot cf43255df7 Remove recursive call of create_star_3:
--create an internally used vector that can reserve its size when constructed
  --create an internally used class to store information required to emulated the call stack
  --the stack used to emulate the call stack is a static thread-safe vector of the function (thus a memory overhead) 
These choices have been made so that the running time of the triangulation is still the same.
2010-06-16 12:27:22 +00:00
Sébastien Loriot 52317dd49f add python script (replace_CGAL_NAMESPACE.py) to replace CGAL_BEGIN_NAMESPACE and CGAL_END_NAMESPACE
by namespace CGAL { and } //namespace CGAL. in all .h and .cpp files
in a directory.
Apply it to all packages in the trunk
Remove macro definition from the config.h file.
2010-06-09 07:37:13 +00:00
Olivier Devillers da7051d179 fixing missing this-> 2010-05-31 09:58:31 +00:00
Laurent Rineau 7e87099363 Merge the branch /branches/candidate-packages/Triangulation_3
- Work from:
    Pedro Machado Manhaes de Castro <Pedro.Machado@sophia.inria.fr>
    Olivier Devillers <Olivier.Devillers@sophia.inria.fr>
- The work is:
    - displacement for 3D triangulation (Olivier and Pedro)
         https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Move_T2T3
2010-05-31 08:48:09 +00:00
Sébastien Loriot e3c0dd54fb change private to protected (needed by 'using locate' in Alpha_shape_3 class) 2010-05-13 06:39:52 +00:00
Andreas Fabri beaff6d265 Add 'using' statement for ansi-compliance 2010-05-11 07:08:10 +00:00
Laurent Rineau 7aedbdf5eb Missing using Tr_base:: (for strict ansi compliance) 2010-05-10 08:43:22 +00:00
Laurent Rineau c4d182b8c7 Oops. Typo.
Locate testing was not testing the right headers.
2010-05-08 11:35:32 +00:00
Laurent Rineau 2257b8b2ab Fix for strict-ansi compliance 2010-05-08 11:24:59 +00:00
Sylvain Pion 85dc12f2a7 Remove empty lines at beginning and end of files
(apply Scripts/developer_scripts/remove_empty_lines.pl).
2010-02-01 12:55:28 +00:00
Andreas Fabri 968a4abc45 std::min -> (std::min) for VC++ 2010-01-27 14:49:38 +00:00
Andreas Fabri d2d5e9df50 Remove random_shuffle from insert(b,e) functions as spatial_sort does it now 2010-01-27 14:24:29 +00:00
Andreas Fabri 6edc1c3f73 Remove random_shuffle from insert(b,e) functions as spatial_sort does it now 2010-01-27 13:50:23 +00:00
Sylvain Pion 60ba9996f3 Replace CGAL::Random by Boost RNG (with geometric distribution)
in the hierarchy as well, to avoid global state sharing issues.
2010-01-26 16:02:53 +00:00
Sylvain Pion 84932f89cc Make locate() deterministic using Boost RNGs.
The previous approach using a local CGAL::Random failed because it still uses a
global state through drand48()...
2010-01-26 14:55:44 +00:00
Sylvain Pion ce3541e210 Improve locate() reproducibility. 2010-01-25 12:11:45 +00:00
Sylvain Pion 033d3ce790 Use Compact_container::owns_dereferencable() in order to speed up is_vertex,
is_edge, is_facet and is_cell.
In passing, fix bugs as the end iterators/handles were incorrectly treated !
2010-01-23 17:30:58 +00:00
Andreas Fabri 8ea590cec5 Add operator for MSVC 2005/2008 to avoid a matching ambiguity 2010-01-21 16:51:49 +00:00
Sylvain Pion 266a053335 More debugging aid : add an is_simplex() function to [expensive] check that
the handle passed to locate() belongs to the triangulation.
2010-01-14 23:20:18 +00:00
Sylvain Pion a8e748d109 Bug-fix (for bug reproducable with probability ~1/50 with the test-suite) :
the "loc" Cell_handle was used after being invalidated by a call to insert()...
Note : this bug was also present in 3.5 (at least).
2010-01-14 18:08:46 +00:00
Sylvain Pion f374ec280c Be paranoid : detect potential users of CGAL_DELAUNAY_3_OLD_REMOVE. 2010-01-13 16:32:32 +00:00
Sylvain Pion 45b6d32b62 Remove old (CGAL < 3.0) version of the remove() code (which could be triggered by CGAL_DELAUNAY_3_OLD_REMOVE).
No one complained about the new code, so let's remove the old remove.
2010-01-13 13:44:54 +00:00
Manuel Caroli 4bcee3abdf add geometric access functions point(...) +doc + tests 2009-12-04 12:14:50 +00:00
Sébastien Loriot 328fb9dfa4 correct bug in Compare_weighted_squared_radius_3::operator() with one point 2009-12-02 18:16:41 +00:00