Skip to content

Commit

Permalink
Fix scaler engine performance regression on Windows: compiling with `…
Browse files Browse the repository at this point in the history
…/fp:fast` option

(cherry picked from commit db88b70)
  • Loading branch information
PierreRaybaut committed Sep 20, 2024
1 parent f0ba357 commit ec6c8c4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def compile_cython_extensions():
# -------------------------------------------------------------------------------------

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

Expand Down
1 change: 0 additions & 1 deletion src/pcolor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <numpy/arrayobject.h>
#ifdef _MSC_VER
#include <float.h>
#pragma fenv_access(on)
#else
#include <fenv.h>
#endif
Expand Down
1 change: 0 additions & 1 deletion src/scaler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <numpy/arrayobject.h>
#ifdef _MSC_VER
#include <float.h>
#pragma fenv_access(on)
#define FE_TOWARDZERO _RC_CHOP
#define fegetround() (_controlfp(0, 0) & _MCW_RC)
int fesetround(int r)
Expand Down

0 comments on commit ec6c8c4

Please sign in to comment.