ATLAS Offline Software
|
Service to enable or disable floating-point exceptions. More...
#include <FPEControlSvc.h>
Public Member Functions | |
virtual StatusCode | initialize () |
Standard initialize method. More... | |
virtual StatusCode | finalize () |
Standard finalize method. More... | |
virtual void | onCreate (const IAlgTool *) |
Called after each tool has been created. More... | |
FPEControlSvc (const std::string &name, ISvcLocator *svcloc) | |
Constructor. More... | |
MsgStream & | msg () const |
MsgStream & | msg (const MSG::Level lvl) const |
bool | msgLvl (const MSG::Level lvl) const |
Private Member Functions | |
void | setFPU () |
Set the FPU exception masks from m_enabled and m_disabled. More... | |
void | prophand (Gaudi::Details::PropertyBase &prop) |
Property change handler. More... | |
Private Attributes | |
StringArrayProperty | m_exceptions |
Property specifying the desired exception mask. More... | |
ServiceHandle< IToolSvc > | m_toolSvc |
Tool service. More... | |
fenv_t | m_env |
The FP environment before we initialize. More... | |
bool | m_haveEnv |
Flag that we've retrieved the environment. More... | |
int | m_enabled |
Mask of enabled exceptions. More... | |
int | m_disabled |
Mask of disabled exceptions. More... | |
bool | m_removeInFinalize |
boolean to decide to (not) remove the observer in finalize More... | |
std::string | m_feSetRounding |
flag to decide on rounding mode (for stability tests) More... | |
Service to enable or disable floating-point exceptions.
When this service initializes, it will set the floating-point exception mask based on the value of the Exceptions
property. This is a string array, containing any of the following strings to enable the corresponding exceptions:
inexact divbyzero underflow overflow invalid
In addition, these words can appear with a ! in front to disable them. Later words take precendence over earlier ones.
The default is divbyzero overflow invalid.
The property can be reassigned at any time to change the current exception mask.
Definition at line 50 of file FPEControlSvc.h.
FPEControlSvc::FPEControlSvc | ( | const std::string & | name, |
ISvcLocator * | svc | ||
) |
Constructor.
name | The service name. |
svcloc | The service locator. |
Definition at line 22 of file FPEControlSvc.cxx.
|
virtual |
|
virtual |
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 27 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
virtual |
Called after each tool has been created.
Observer callback.
This is called after each tool is created. We make sure that the FPE mask is still set correctly. We do this because some tools have been observed to mask off exceptions. In particular, libgfortran will mask exceptions off when it's first loaded. So, if libgfortran hasn't yet been loaded when we initialize, but then gets loaded later, then exceptions will remain masked off.
Definition at line 115 of file FPEControlSvc.cxx.
|
private |
|
private |
Set the FPU exception masks from m_enabled and m_disabled.
Definition at line 216 of file FPEControlSvc.cxx.
|
private |
Mask of disabled exceptions.
Definition at line 92 of file FPEControlSvc.h.
|
private |
Mask of enabled exceptions.
Definition at line 89 of file FPEControlSvc.h.
|
private |
The FP environment before we initialize.
Definition at line 83 of file FPEControlSvc.h.
|
private |
Property specifying the desired exception mask.
Definition at line 77 of file FPEControlSvc.h.
|
private |
flag to decide on rounding mode (for stability tests)
Definition at line 98 of file FPEControlSvc.h.
|
private |
Flag that we've retrieved the environment.
Definition at line 86 of file FPEControlSvc.h.
|
private |
boolean to decide to (not) remove the observer in finalize
Definition at line 95 of file FPEControlSvc.h.
|
private |
Tool service.
Definition at line 80 of file FPEControlSvc.h.