Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Multithreading and do_intersect(..)

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Multithreading and do_intersect(..)


Chronological Thread 
  • From: Bernhard Kornberger <>
  • To:
  • Subject: Re: [cgal-discuss] Multithreading and do_intersect(..)
  • Date: Sun, 29 Jan 2012 13:56:15 +0100


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)


Thank you for the valuable hint regarding profiling. However,
multithreading still doesn't work reliably. So I have one more
question. Let's create segments like this:

***
#define CGAL_HAS_THREADS
typedef CGAL::Exact_predicates_exact_constructions_kernel K;

K::Point_3 a(0,0,0);
K::Point_3 b(1,0,0);
K::Point_3 c(0,1,0);

K::Segment_3 s0(a,b);
K::Segment_3 s1(a,c);
***

Are s0 and s1 independent so that they can be treated by different
threads? Or does the reference counting of Gmpq some magic behind
the scenes that links the segments to the same point?

Best regards

Bernhard Kornberger



Archive powered by MHonArc 2.6.16.

Top of Page