Skip to content

Commit a859639

Browse files
committed
Fix scaler engine performance regression on Windows: compiling with /fp:fast option
Fix Windows: Image `_scaler` engine performance regression #23 (cherry picked from commit db88b70) (cherry picked from commit ec6c8c4)
1 parent 241416a commit a859639

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def compile_cython_extensions():
5050
# -------------------------------------------------------------------------------------
5151

5252
MACROS_CPP = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
53-
CFLAGS_CPP = ["/EHsc"] if is_msvc() else ["-Wall"]
53+
CFLAGS_CPP = ["/EHsc", "/fp:fast"] if is_msvc() else ["-Wall"]
5454
if platform.system() == "Darwin":
5555
CFLAGS_CPP += ["-std=c++11"]
5656

src/pcolor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <numpy/arrayobject.h>
1010
#ifdef _MSC_VER
1111
#include <float.h>
12-
#pragma fenv_access(on)
1312
#else
1413
#include <fenv.h>
1514
#endif

src/scaler.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <numpy/arrayobject.h>
1010
#ifdef _MSC_VER
1111
#include <float.h>
12-
#pragma fenv_access(on)
1312
#define FE_TOWARDZERO _RC_CHOP
1413
#define fegetround() (_controlfp(0, 0) & _MCW_RC)
1514
int fesetround(int r)

0 commit comments

Comments
 (0)