Subject: CGAL users discussion list
List archive
- From: giannis assiouras <>
- To: Marc Glisse <>
- Cc:
- Subject: Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash
- Date: Wed, 2 May 2012 09:33:23 +0200
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?
Best Regards,
Ioannis
2012/5/1 Marc Glisse <>
On Tue, 1 May 2012, Philipp Moeller wrote:That is a possibility, but the interface is far from a perfect match, especially if you take all the variants we have in cgal into account.
Another approach I have been pondering is to simply throw all our ref
counted objects into shared_ptr.
The standard libraries that come with gcc, llvm and visual studio all do.
At least the boost version uses atomic counters on most platforms
shared_ptr has heavier functionalities than a simple reference-counted structure which makes it unavoidably slower. The boost library might be particularly bad, I don't know, but the last time I looked (possibly 2009), if I remember correctly, it was orders of magnitude slower than anything else I tried, for this use. Or maybe that was gcc's placeholder atomic implementation (they have a real one now)? Well, boost certainly wasn't among the faster alternatives.
This might have some drawbacks I don't see yet. At least
boost::shared_ptr is known to have some performance deficiencies
compared to vendor implementations.
It is certainly worth reevaluating today, if someone has time...
--
Marc Glisse
- [cgal-discuss] Re: CGAL+GMP and multithreading crash, Marc Glisse, 05/01/2012
- Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash, Philipp Moeller, 05/01/2012
- Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash, Marc Glisse, 05/01/2012
- Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash, giannis assiouras, 05/02/2012
- Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash, Marc Glisse, 05/02/2012
- Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash, giannis assiouras, 05/04/2012
- [cgal-discuss] Re: CGAL+GMP and multithreading crash, antoine, 05/10/2012
- Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash, giannis assiouras, 05/02/2012
- Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash, Marc Glisse, 05/01/2012
- Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash, Philipp Moeller, 05/01/2012
Archive powered by MHonArc 2.6.16.