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
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
Clément Jamin
ffc70d4482
Added support for concurrency to "locate" + minor changes
2012-11-20 15:16:21 +01: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
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
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
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
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
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
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
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