Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Is snap_rounding_2 operation thread safe?
- Date: Tue, 14 Jun 2016 08:48:30 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:OPctTRwZdu2yPTXXCy+O+j09IxM/srCxBDY+r6Qd0ewQIJqq85mqBkHD//Il1AaPBtWKraIewLOO7OjJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6DyZTtnLnqpNX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD86Fpy8kVWqrze+E0TKdTES89G2Ez/szi8xfZHiWV4X5JGF4bmBNTHwnI6lneWY3wtTey9sVw3yyXIdfnY7k/RTO4/uYhAEvzjCAdNjkltmTTosN1haNf5hmmokoskMbvfIiJOa8mLevmdtQASD8ZUw==
- Organization: GeometryFactory
This will be fixed as soon as https://github.com/CGAL/cgal/pull/648
will be ready.
Sebastien.
On 05/11/2016 09:29 AM, nsoonhui wrote:
From my code, it doesn't seem so. But I have not have the time to reproduce a
sample for this.
A comment
<https://sourceforge.net/p/flightgear/terragear/ci/86aa9261ca6b38bf14257ae45fc7c6c1120d17d2/tree/src/Lib/terragear/mesh/tg_mesh_arrangement_cleaning.cxx?diff=b740168613e5fbfa8fe7565429d06ceba30a54af>
on the internet seems to agree with me:
+ // snap rounding notes:
+ // 1) doesn't appear to be threadsafe
+ // 2) no way to define the origin of snapping. so if a point is at
0,0, and pixel size is 1, new point will be at 0.5, 0.5.
+ // We don't want this, so we translate the entire dataset back by
1/2 pixel size so 0,0 is still 0,0
+
+ lock->lock();
+ CGAL::snap_rounding_2<srTraits, srSegmentList::const_iterator,
srPolylineList>
+ (srInput.begin(), srInput.end(), srOutput, 0.0000002, true, false, 5);
+ lock->unlock();
Is it possible that you make this operation thread safe?
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Is-snap-rounding-2-operation-thread-safe-tp4661900.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- Re: [cgal-discuss] Is snap_rounding_2 operation thread safe?, Sebastien Loriot (GeometryFactory), 06/14/2016
- Re: [cgal-discuss] Is snap_rounding_2 operation thread safe?, Laurent Rineau (CGAL/GeometryFactory), 06/14/2016
Archive powered by MHonArc 2.6.18.