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
Clement Jamin
dc7096b1e5
This parallel version of the Perturber seems much better. Needs to be tested...
2012-12-13 20:39:37 +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
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
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