Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Rounding mode (as specified in FPU.h)

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Rounding mode (as specified in FPU.h)


Chronological Thread 
  • From: Marc Glisse <>
  • To:
  • Subject: Re: [cgal-discuss] Rounding mode (as specified in FPU.h)
  • Date: Thu, 28 Feb 2013 20:20:27 +0100 (CET)

On Thu, 28 Feb 2013, marcosscriven wrote:

I'm trying to cross-compile CGAL (just the core - not ImageIO or Qt stuff)
into Javascript with Emscripten.

I've got *really* close - having successfully compiled and tested GMP and
MPFR in Javascript. I've also managed to drop the dependency on boost-thread
(by turning on CGAL_HAS_NO_THREADS, and dropping the test to load
libboost-thread)

The only sticking point is that all the rounding modes in FPU.h (whatever
the macro conditions) end up in some hardware specific. Even if you include
one of the ones from an fenv.h somewhere, that still ends up in asm code.

The question is, is there a generic workaround for this that doesn't require
an assembly implementation for this?

Hmm, using the variant with fesetround/fegetround and making sure that IA_force_to_double uses the "volatile double" path should avoid the inline asm. What specific asm are you failing to get rid of?

--
Marc Glisse



Archive powered by MHonArc 2.6.18.

Top of Page