Subject: CGAL users discussion list
List archive
- From: nsoonhui <>
- To:
- Subject: [cgal-discuss] Is snap_rounding_2 operation thread safe?
- Date: Wed, 11 May 2016 00:29:15 -0700 (PDT)
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=None
- Ironport-phdr: 9a23:zNqv3B1A85KvyZebsmDT+DRfVm0co7zxezQtwd8ZsegTL/ad9pjvdHbS+e9qxAeQG96LurQd1qGP6fyocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC3oLuiqvrocGbSj4LrQT+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf9d32JiKAHbtR/94sCt4MwrqHwI6LoX3pUeAOCjJ+x4FuQATWduD2dg78LisVzPTBCE+2AHemQQiBtBRQbfvz/gWZKktDD9sex9xSjSadbxSrY0RDXk6ah2YBDtgSYDcTU+9TeE2YRLkKtHrUf49FREyInObdTObKJz
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.
- [cgal-discuss] Is snap_rounding_2 operation thread safe?, nsoonhui, 05/11/2016
Archive powered by MHonArc 2.6.18.