File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,13 @@ if (CMAKE_CXX_COMPILER_ID IN_LIST GNU_LIKE_FRONTENDS)
1212 set (FINUFFT_CXX_FLAGS_RELEASE -O3
1313 -funroll-loops
1414 -ffp-contract=fast
15- -fexcess-precision=fast
1615 -fno-math-errno
1716 -fno-signed-zeros
1817 -fno-trapping-math
1918 -fassociative-math
2019 -freciprocal-math
2120 -fmerge-all -constants
2221 -ftree-vectorize
23-
2422 )
2523 # if -fimplicit-constexpr is supported, add it to the list of flags
2624 check_cxx_compiler_flag("-fimplicit-constexpr" COMPILER_SUPPORTS_FIMPLICIT_CONSTEXPR)
Original file line number Diff line number Diff line change @@ -27,7 +27,11 @@ PYTHON = python3
2727# Notes: 1) -Ofast breaks isfinite() & isnan(), so use -O3 which now is as fast
2828# 2) -fcx-limited-range for fortran-speed complex arith in C++
2929# 3) we use simply-expanded (:=) makefile variables, otherwise confusing
30- CFLAGS := -O3 -funroll-loops -march=native -fcx-limited-range -ffp-contract=fast $(CFLAGS )
30+ # 4) the extra math flags are for speed, but they do not impact accuracy
31+ # they allow gcc to vectorize the code more effectively
32+ CFLAGS := -O3 -funroll-loops -march=native -fcx-limited-range -ffp-contract=fast\
33+ -fno-math-errno -fno-signed-zeros -fno-trapping-math -fassociative-math\
34+ -freciprocal-math -fmerge-all-constants -ftree-vectorize $(CFLAGS )
3135FFLAGS := $(CFLAGS ) $(FFLAGS )
3236CXXFLAGS := $(CFLAGS ) $(CXXFLAGS )
3337# FFTW base name, and math linking...
You can’t perform that action at this time.
0 commit comments