Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash


Chronological Thread 
  • From: Marc Glisse <>
  • To: giannis assiouras <>
  • Cc:
  • Subject: Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash
  • Date: Wed, 2 May 2012 13:52:59 +0200 (CEST)

On Wed, 2 May 2012, giannis assiouras wrote:

Thanks for your answer. I am also considering the alternative of making
copies of all the objects that may be accessed by several threads.. However,
since all copies of an object share a common representation object storing
the data associated with a kernel object how this solution could be thread
safe with the current implementation?

You need to construct new objects instead of copying.
For Gmpq:
Gmpq b=a.mpq();

For a point, take its x, y and z coordinates, "copy" them by the method above, and construct a new point from the 3 coordinates. With Lazy_*, which you get with Epeck, you may need to use .exact() to get the real representation.

Are you sure the filtered version of Simple_cartesian<mpq_class> is not good enough for you?

--
Marc Glisse



Archive powered by MHonArc 2.6.16.

Top of Page