Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: Torchi Borchi <>
  • To:
  • Subject: Re: [cgal-discuss] CGAL+GMP and multithreading crash
  • Date: Wed, 24 Jun 2009 19:30:27 +0200

i would like to try mpq_class but:

#include <CGAL/gmpxx.h>
typedef mpq_class RT;
typedef CGAL::Cartesian<RT> K;

this does not work. how can use mpq_class to get a kernel?
i cant find any documentation or example.

i see also that #include <CGAL/gmpxx.h> is including
#include <gmpxx.h>

gmpxx.h is missing in CGAL-3.4-Setup.exe

i downloaded gmp-4.3.1 and added the path to gmpxx.h.
but i still dont know how to make a kernel out of mpq_class.


Sylvain Pion schrieb:
torchi borchi wrote:
i followed your suggestion and tried this:

typedef CGAL::Gmpq RT;
typedef CGAL::Simple_cartesian<RT> K;

but it still crashes. is Gmpq using reference counting?

Yes, it uses the same thread-unsafe mechanism.

i need exact constructions.

Try mpq_class instead of Gmpq ?
Or Quotient<MP_Float>, but that can be much slower.

Otherwise, someone needs to bite the bullet and fix
the reference counting mechanism (in <CGAL/Handle_for.h>).





Archive powered by MHonArc 2.6.16.

Top of Page