|
Boost : |
Subject: Re: [boost] enabling/disabling floating point exceptions
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2009-09-15 12:28:03
> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On
Behalf Of
> Gennadiy Rozental
> Sent: Monday, August 31, 2009 8:00 AM
> To: boost_at_[hidden]
> Subject: [boost] enabling/disabling floating point exceptions
>
> 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
>
> Would anyone care to extend this list/comment on it's applicability
> and/or correctness?
What a can of worms! Making it portable would encourage use. Good luck!
> 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?
Sounds reasonable and useful.
Paul
--- Paul A. Bristow Prizet Farmhouse Kendal, UK LA8 8AB +44 1539 561830, mobile +44 7714330204 pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk