|
Boost : |
Subject: [boost] enabling/disabling floating point exceptions
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-08-31 03:00:08
Hi guys,
I am looking to complete cross platform implementation of
enabling/disabling logic in boost::execution_monitor. It looks like
there is no standard interface available. I'm using _controlfp interface
now on Windows. I also found these non-standard extensions:
* feenableexcep/fedisableexcept available with glib 2.2
* fesettrapenable avaialble in Dinkumware (implementation of STL?) and HP
* sun has something called fex_set_handling. not sure when it's
available though
* header fpu_control.h. Not sure where it's available though.
* MAC OS X has something called _MM_SET_EXCEPTION_MASK in xmmintrin.h
It also seems that in some cases the switch is compile time only (using
compilation option).
Would anyone care to extend this list/comment on it's applicability
and/or correctness?
Another change I am considering is to split floating point exception
catching from other system exceptions. It seems perfectly valid scenario
to set catch_system_error to false (thus avoid catching access
violations etc) but still willing to catch and process floating point
exception. What do you think?
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk