Subject: CGAL users discussion list
List archive
- From: Philipp Moeller <>
- To:
- Cc:
- Subject: Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash
- Date: Tue, 01 May 2012 21:09:35 +0200
- Organization: GeometryFactory
Marc Glisse
<>
writes:
> On Tue, 1 May 2012,
>
> wrote:
>
>> Many thanks for your response. Could you give me some quick
>> instructions if I go and fix the reference counting mechanism
>> e.g. pointer to some existing prototype, what support is already
>> there and what needs to be done.
>
> Replacing unsigned int with std::atomic_uint for the member "count" in
> CGAL/Handle_for.h would go a long way for Gmpq. You can try similar
> things in other Handle* files, Handle.h looks like it might be ok with
> a simple int -> std::atomic_int, Handle_with_policy would be
> hard. Sorry, if it was trivial it probably would have been done
> already.
Another approach I have been pondering is to simply throw all our ref
counted objects into shared_ptr. At least the boost version uses atomic
counters on most platforms and it would relieve us from the burden of
having our own reference counting mechanism.
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 would be an interesting experiment at least.
--
Philipp Moeller
GeometryFactory
- [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.