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
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
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
Olivier Devillers
bb02600abb
better predicates in triangulation traits
2011-10-19 12:43:10 +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
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
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
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
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
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
c79a1ebbf6
int -> size_type/std::size_t
2010-06-21 14:12:02 +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
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
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
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
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
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
Sylvain Pion
d09319501c
Use canonical form for for-loops over iterator ranges.
2009-11-10 12:53:07 +00:00
Sylvain Pion
8573fe26ce
Rename CGALi to internal.
2009-08-24 17:10:04 +00:00
Sylvain Pion
57603f0b3b
Allow CGAL::Default for the TDS parameters of the three main triangulation classes.
...
(patch extracted from the Triangulation_3_Location_policy branch as it is mostly orthogonal)
2009-08-17 09:48:07 +00:00
Sylvain Pion
919321e300
Give the TDS the ability to store a more general Cell_data in cells,
...
than just an implicit access to a conflict_flag.
2009-08-11 20:05:42 +00:00
Sylvain Pion
094505bb76
Define Face_circulator together with the other types.
2009-08-07 20:50:32 +00:00
Sylvain Pion
8fdac12e77
Add insert_in_hole() function overloads (in T3 and TDS_3) taking an additional
...
Vertex_handle argument that specifies the vertex to be used for the new vertex
(instead of creating a new one internally).
2009-08-04 13:48:07 +00:00
Sylvain Pion
395b1d569e
Remove white spaces at end of lines.
2009-08-04 13:36:15 +00:00
Sylvain Pion
f846f65dcf
Fix indentation (4-spaces tabs had been introduced by Camille...).
2009-08-04 13:29:40 +00:00
Sylvain Pion
cb7bbc1619
Minor cleanup (un-share variable).
2009-08-04 12:58:30 +00:00
Sylvain Pion
ffedfc0d58
Add some locate() and insert() convenient overloads, taking the start hint as a
...
Vertex_handle (instead of the Cell_handle currently).
2009-07-24 21:57:38 +00:00
Sylvain Pion
7df2a2df3b
Remover short name macros. See PR 1551.
2009-04-21 18:34:14 +00:00
Monique Teillaud
ba9b7b7143
incident_vertices(vertex) renamed as adjacent_vertices()
...
old name left for backward compatibility (and old functions still tested)
2009-04-08 10:06:32 +00:00
Camille Wormser
0e0975df31
same derecursion, for find_conflict, this time.
2008-11-14 10:43:11 +00:00
Sylvain Pion
4aa1cb057a
Remove my email adress from header files.
2008-10-11 20:21:08 +00:00
Manuel Caroli
25a4741b11
revert change, code was right before
2008-09-15 20:54:02 +00:00
Manuel Caroli
a1802d060c
pass assignment operator argument as reference
2008-09-15 19:36:15 +00:00
Sylvain Pion
93cae6500f
Remove deprecated functions find_conflicts_2 and find_conflicts_3
...
(deprecated in 2006, and internal).
2008-07-28 18:16:14 +00:00
Manuel Caroli
7f70bb34c1
moved identical remove helper functions from
...
Delaunay_triangulation_3 and Regular_triangulation_3
to Triangulation_3
2008-07-03 12:11:31 +00:00
Camille Wormser
a6d18262ae
adds (finite_) incident_facets(Vertex) for the 2D case,
...
deprecates the usage of (finite_) incident_cells in the 2D case.
2008-06-05 02:51:51 +00:00
Camille Wormser
646258adb8
finished rewriting the incident_*(vertex):
...
- all the code is factored around visit_incident_cells.
- incident_edges has been added
- finite versions of all incident_*(vertex) have been added
thanks to a Filter template parameter
2008-04-20 05:48:13 +00:00
Camille Wormser
049a65f766
adds incident_edges and factors all incident_* code
...
by wrapping everything around a visit_incident_cells
method.
2008-04-01 14:44:18 +00:00
Sylvain Pion
a47abc28d1
Use <boost/bind.hpp> instead of <CGAL/functional.h>.
2008-03-10 01:21:00 +00:00
Sylvain Pion
88ed563f44
Remove some workarounds for SunPRO + RW's STL:
...
CGAL_CFG_MISSING_TEMPLATE_VECTOR_CONSTRUCTORS_BUG
CGAL_CFG_RWSTD_NO_MEMBER_TEMPLATES (partially so far)
CGAL_make_vector
CGAL_make_list
2008-01-03 14:50:13 +00:00
Sylvain Pion
1df8df5721
Allow operator== between triangulations to have 2 different TDS types.
2007-07-24 12:57:49 +00:00
Sylvain Pion
b197e42c61
Slight optimization
2007-06-11 16:19:24 +00:00
Sylvain Pion
ae242392dc
Use CGAL_make_vector()
2007-04-02 20:19:14 +00:00
Christophe Delage
a7f0ead112
Triangulation_3 iterator range insert and constructors now
...
use spatial_sort.
Examples and demos now call range insert when possible.
2007-03-30 09:30:22 +00:00
Sylvain Pion
fa028cd4c5
remove warning
2007-03-03 08:51:50 +00:00
Michael Hemmer
43cd342945
rm problems with CGAL::sign(CGAL::Sign)
2006-10-30 11:39:30 +00:00
Monique Teillaud
49098985b5
more precondition fixes
2006-10-04 10:00:09 +00:00
Nico Kruithof
dd96d5559d
removed extra template argument from find_conflicts to make SUN happy again.
2006-09-27 08:01:05 +00:00
Nico Kruithof
245a988b26
Coded one generic insert for Delaunay and regular.
2006-09-18 15:35:02 +00:00
Nico Kruithof
9c781b9d34
Merged find_conflicts_{2|3} into find_conflicts.
...
Deprecated find_conflicts_{2|3}.
2006-08-25 09:25:33 +00:00
Nico Kruithof
7ce6d89b94
Adding the simplex class to the Triangulation_3 package.
2006-08-09 15:25:13 +00:00
Laurent Rineau
7f053b6b83
- fixed operators << and >> for triangulations, if the stream is in binary
...
mode
- fixed only if dimension()==3. If dimension()<3, tds.print_cells() should
be corrected. The handling of the dimension is ugly (copy-pasting). I
prefere not to fix that code.
Note 1: Test suite is ok.
Note 2: binary i/o operators are tested in Mesh_3
2006-07-12 00:00:48 +00:00
Sylvain Pion
3490c38e98
- Qualify filter_iterator with CGAL:: to avoid ADL issues.
2006-06-15 08:49:29 +00:00
Laurent Saboret
db6a8f948c
Change CVS keywords to SVN style
2006-02-16 14:30:13 +00:00
Laurent Saboret
1aad55d4cb
Change CVS keywords to SVN style
2006-02-14 10:08:15 +00:00
Laurent Saboret
ee07ad352c
Move packages to trunk root
2006-02-14 08:58:20 +00:00