Subject: CGAL users discussion list
List archive
- From: Narusaki <>
- To:
- Subject: [cgal-discuss] Multiple threads with Nef_polyhedron_2
- Date: Thu, 2 Jun 2016 01:40:03 -0700 (PDT)
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=None
- Ironport-phdr: 9a23:szwcBROwDaEGvl8SlvYl6mtUPXoX/o7sNwtQ0KIMzox0KPjzrarrMEGX3/hxlliBBdydsKIVzbeH+Pm5EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35XxirH5osSbSj4LrQT+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf9d32JiKAHbtR/94sCt4MwrqHwI6LoX3pUeAOCjJ+x4FuQATWduD2dg78LisVzPTBCE+2AHemQQiBtBRQbfvz/gWZKklCLgq/F02yjSad3rRqBsCRyt6q5qTFnjjyJRZG1xy33elsEl1fETmxmmvREqmNaMbQ==
Hi,
I'm using the Nef_polyhedron_2 to execute intersection of some polygons
(constructed from several half-lines and may be unbounded).
The question is: When I did it with only a single thread, it is OK; but when
I've tried with multiple threads using OpenMP, there is an assertion in the
locate() method of a Voronoi_diagram_2 object being triggered.
At last I locate the problem at some part about the intersection of
Nef_polyhedrons. I guess there is sth wrong in the operator *= (i.e. the
intersection operation) of the Nef_polyhedron_2 because when I comment the
following code:
int idx = omp_get_thread_num();
vorCellNef *= boundaryNefs[idx];
No assertion is triggered anymore. I don't know how this piece of code can
affect the locate() method. On the other side, both of the two
Nef_polyhedron_2 objects (vorCellNef and boundaryNefs[idx]) on the two sides
of *= are local variables for each thread, so I guess it should be OK even
if the Nef_polyhedron_2 is not thread-safe.
Does anyone know what may go wrong here? Thanks very much.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Multiple-threads-with-Nef-polyhedron-2-tp4661970.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Multiple threads with Nef_polyhedron_2, Narusaki, 06/02/2016
Archive powered by MHonArc 2.6.18.