Commit Graph

62 Commits

Author SHA1 Message Date
Clement Jamin 730d34bb23 Create a separate Mesher_level.h file for Mesh_3
Before, we were using the Mesher_level.h file of the Mesh_2 package,
but the parallel version introduced some changes and a
dependency from Mesh_2 to Mesh_3 that is not wished.
I restored the original Mesher_level.h file in Mesh_2.
2013-09-11 15:45:55 +02:00
Clement Jamin 138710d997 Remove useless #include 2013-07-25 14:44:01 +02:00
Clement Jamin bc360c8b13 Changes for GCC compilation + removed some trailing spaces 2013-06-07 17:40:53 +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 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 8745b999ad Replaced is_base_of by is_convertible. 2013-05-22 15:15:05 +02:00
Clement Jamin f2d188c599 Replaced the CGAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE macro
Now, we add points on a far spheres by default in the parallel version, but not in the sequential version. So, two macros: CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE and CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE.
2013-03-15 14:30:35 +01:00
Clement Jamin 462fac46fc No output if no VERBOSE mode activated + class for debugging
Replaced ExplicitFacet by Explicit_simplex for debugging purpose
2013-03-14 11:17:04 +01:00
Clement Jamin ce9aba9375 Removed the parallel_for-based and parallel_do-based strategies.
Just keep the task-scheduler-based strategy, the fastest one.
2013-03-13 11:23:46 +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 a8d38a5fed Code clean-up 2013-02-28 19:46:06 +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 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
Clement Jamin 70312d7299 Code clean-up 2013-02-13 19:57:01 +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
Clement Jamin c4859681e3 Removed the "localization ids" related code.
It was an old, unused and slow.
2013-02-06 18:57:36 +01:00
Clément Jamin 4f262b956a Clean-up TODOs 2012-11-20 15:00:32 +01:00
Clément Jamin 3ff6969e63 Had forgotten to remove this temporary code 2012-10-25 12:00: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 0a081c2abd Add an option to check the syntax of headers, individually.
That feature can be enabled with g++, clang++, and icpc (intel). It could
be implemented for MSVC, with the flag /Zs, but that is not yet done (and
probably will not).

The option is controlled by a CMake option, CGAL_ENABLE_CHECK_HEADERS, that
is disabled by default. If that option is enabled by the user, then CMake
will check if the compiler $CXX understand the syntax:
  $CXX -x c++ -fsyntax-only CGAL/header.h
and send an error otherwise.

Then phony targets will be created:
  - a target check_CGAL__header_h for each header <CGAL/header.h>,
  - a target check_pkg_<pkg> for each package <pgk>,
  - and a target check_headers for the whole CGAL.

Those new targets currently give a lot of compilation errors if
CGAL_ENABLE_CHECK_HEADERS is enabled!

+ fix several missing includes in Mesh_2.
2012-10-05 12:21:44 +00:00
Clément Jamin 23ff0b1012 Oops, bugfix on my previous bugfix 2012-08-31 08:41:47 +00:00
Clément Jamin e401dd9175 Bugfix (see comment in Mesher_level.h) 2012-08-31 08:30:14 +00:00
Clément Jamin fc40c96c3d For GCC 2012-07-11 10:11:31 +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
Clément Jamin 40f602fea9 Minor changes (comments, etc.) 2012-06-21 12:03:03 +00:00
Clément Jamin d42a0fc71d Improved tag dispatching 2012-06-20 13:04:40 +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 78cddbe55b bugfix 2012-06-13 10:04:23 +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
Clément Jamin d2792dff8d - Added the ability to add points on a sphere outside the domain in the sequential case => better performance for the fandisk model (x2). I'm still wondering why...
- Code refactoring/clean-up
2012-05-04 15:20:28 +00:00
Clément Jamin 9da17676e9 Clean-up / formatting 2012-05-03 16:37:48 +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 107a428fb5 - Added the ability to sort work batches according to quality, in order to reduce the number of inserted vertices
- Modified config parameters manager (Concurrent_mesher_config class)
2012-05-02 15:21:31 +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 fb7d171271 Oops. Forgot to remove a line. 2012-04-24 16:01:54 +00:00
Clément Jamin 107b268756 - Now, we first start by a little bit of sequential refinement, in order to get a better approximation of the bounding box
- New worksharing strategy, which groups tasks by batches and let TBB manage the load balancing => the results are slightly improved, compared to parallel_do
- New params in config file
2012-04-24 15:06:10 +00:00
Clément Jamin fc121a451d - Some clean-up
- Function get_number_of_bad_elements in the mesher levels (for debugging)
- option CGAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE to reduce contention on the infinite vertex
2012-04-24 07:59:29 +00:00
Clément Jamin 9492b2eb84 Added the option to sort the refinement queue after the initial scans (facets and cells), when the queue is an unsorted container. 2012-04-20 09:45:58 +00:00
Clément Jamin 8002220aed Clean-up and bugfixes 2012-04-13 13:57:54 +00:00
Clément Jamin ce132eb34a The concurrency parameters are now stored in a config file which is handled via boost::program_options. 2012-04-12 13:37:15 +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
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 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