Subject: CGAL users discussion list
List archive
- From: Marc Glisse <>
- To:
- Subject: Re: [cgal-discuss] Multithreading and do_intersect(..)
- Date: Sun, 29 Jan 2012 10:08:34 +0100 (CET)
On Sun, 29 Jan 2012, Bernhard Kornberger wrote:
I use CGAL 3.9 and my multithreaded code fails occasionally. Now I'd
like to ask if the respective part of CGAL is thread safe? Here is a
code snippet:
***
#define CGAL_HAS_THREADS
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
class ESegment_3 : public K::Segment_3
{
...
}
EPoint_3* ESegment_3::splitLowPoint(const K::Line_3& axLin)
{
if(CGAL::do_intersect(*this,axLin)) // Line 582
{
}
}
***
There are 8 std::vector<ESegment*>, and they are treated by 8
separate threads. Each ESegment is unique. Here is a backtrace,
created with gdb:
If no object is accessed from 2 different threads, you should be fine...
(by the way, it looks like you are profiling your code, which doesn't always work great with multiple threads)
--
Marc Glisse
- [cgal-discuss] Multithreading and do_intersect(..), Bernhard Kornberger, 01/29/2012
- Re: [cgal-discuss] Multithreading and do_intersect(..), Marc Glisse, 01/29/2012
- Re: [cgal-discuss] Multithreading and do_intersect(..), Bernhard Kornberger, 01/29/2012
- Re: [cgal-discuss] Multithreading and do_intersect(..), Marc Glisse, 01/29/2012
- Re: [cgal-discuss] Multithreading and do_intersect(..), Bernhard Kornberger, 01/29/2012
- Re: [cgal-discuss] Multithreading and do_intersect(..), Marc Glisse, 01/29/2012
Archive powered by MHonArc 2.6.16.