Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::ScopedFloatingPointEnv Class Reference

#include <fp_utils.h>

Public Member Functions

 ScopedFloatingPointEnv ()
 
 ~ScopedFloatingPointEnv ()
 
void EnableExceptions (int excepts)
 

Detailed Description

ScopedFloatingPointEnv is used to easily enable Floating-point exceptions. The initial state is automatically restored when the object is deleted.

Note(user): For some reason, this causes an FPE exception to be triggered for unknown reasons when compiled in 32 bits. Because of this, we do not turn on FPE exception if x86_64 is not defined.

Todo

(user): Make it work on 32 bits.

(user): Make it work on msvc, currently calls to _controlfp crash.

Definition at line 66 of file fp_utils.h.

Constructor & Destructor Documentation

◆ ScopedFloatingPointEnv()

operations_research::ScopedFloatingPointEnv::ScopedFloatingPointEnv ( )
inline

Definition at line 68 of file fp_utils.h.

◆ ~ScopedFloatingPointEnv()

operations_research::ScopedFloatingPointEnv::~ScopedFloatingPointEnv ( )
inline

Definition at line 76 of file fp_utils.h.

Member Function Documentation

◆ EnableExceptions()

void operations_research::ScopedFloatingPointEnv::EnableExceptions ( int excepts)
inline

Definition at line 84 of file fp_utils.h.


The documentation for this class was generated from the following file: