Skip to content

Commit 066bd02

Browse files
committed
Remove the FFTW bindings from Base (#21956)
1 parent ce3f853 commit 066bd02

33 files changed

+62
-2503
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ before_install:
8686
BUILDOPTS="-j3 USECLANG=1 LLVM_CONFIG=$(brew --prefix llvm39-julia)/bin/llvm-config LLVM_SIZE=$(brew --prefix llvm39-julia)/bin/llvm-size";
8787
BUILDOPTS="$BUILDOPTS VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC=-I$(brew --prefix suite-sparse-julia)/include FORCE_ASSERTIONS=1";
8888
BUILDOPTS="$BUILDOPTS LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas";
89-
for lib in LLVM SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND; do
89+
for lib in LLVM SUITESPARSE ARPACK BLAS LAPACK GMP MPFR PCRE LIBUNWIND; do
9090
BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1";
9191
done;
9292
export LDFLAGS="-L$(brew --prefix openblas-julia)/lib -L$(brew --prefix suite-sparse-julia)/lib";

DISTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ separated most of the notes by OS.
1212
Note that while the code for Julia is
1313
[MIT-licensed, with a few exceptions](https://github.com/JuliaLang/julia/blob/master/LICENSE.md),
1414
the distribution created by the techniques described herein will be
15-
GPL licensed, as various dependent libraries such as `FFTW` and
16-
`SuiteSparse` are GPL licensed. We do hope to have a
17-
non-GPL distribution of Julia in the future.
15+
GPL licensed, as various dependent libraries such as `SuiteSparse` are
16+
GPL licensed. We do hope to have a non-GPL distribution of Julia in the future.
1817

1918
Versioning and Git
2019
------------------

LICENSE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ their own licenses:
5656
- [OPENLIBM](https://github.com/JuliaLang/openlibm/blob/master/LICENSE.md) [MIT, BSD-2, ISC]
5757
- [OPENSPECFUN](https://github.com/JuliaLang/openspecfun) [MIT, public domain]
5858
- [FADDEEVA](http://ab-initio.mit.edu/Faddeeva) [MIT]
59-
- [FFTW](http://fftw.org/doc/License-and-Copyright.html) [GPL2+]
6059
- [GMP](http://gmplib.org/manual/Copying.html#Copying) [LGPL3+ or GPL2+]
6160
- [LIBGIT2](https://github.com/libgit2/libgit2/blob/development/COPYING) [GPL2+ with unlimited linking exception]
6261
- [CURL](https://curl.haxx.se/docs/copyright.html) [MIT/X derivative]

Make.inc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ USE_SYSTEM_OPENSPECFUN:=0
3535
USE_SYSTEM_DSFMT:=0
3636
USE_SYSTEM_BLAS:=0
3737
USE_SYSTEM_LAPACK:=0
38-
USE_SYSTEM_FFTW:=0
3938
USE_SYSTEM_GMP:=0
4039
USE_SYSTEM_MPFR:=0
4140
USE_SYSTEM_ARPACK:=0
@@ -54,8 +53,6 @@ USE_LLVM_SHLIB := 1
5453
## Settings for various Intel tools
5554
# Set to 1 to use MKL
5655
USE_INTEL_MKL ?= 0
57-
# Set to 1 to use MKL FFT
58-
USE_INTEL_MKL_FFT ?= 0
5956
# Set to 1 to use Intel LIBM
6057
USE_INTEL_LIBM ?= 0
6158
# Set to 1 to enable profiling with Intel VTune Amplifier
@@ -864,14 +861,6 @@ LIBLAPACKNAME := liblapack
864861
endif
865862
endif
866863

867-
ifeq ($(OS), WINNT)
868-
LIBFFTWNAME := libfftw3
869-
LIBFFTWFNAME := libfftw3f
870-
else
871-
LIBFFTWNAME := libfftw3_threads
872-
LIBFFTWFNAME := libfftw3f_threads
873-
endif
874-
875864
ifeq ($(USE_SYSTEM_LIBM), 1)
876865
LIBM := -lm
877866
LIBMNAME := libm
@@ -1059,12 +1048,6 @@ LIBBLAS := $(MKL_LDFLAGS)
10591048
LIBLAPACK := $(MKL_LDFLAGS)
10601049
endif
10611050

1062-
ifeq ($(USE_INTEL_MKL_FFT), 1)
1063-
USE_SYSTEM_FFTW := 1
1064-
LIBFFTWNAME := libmkl_rt
1065-
LIBFFTWFNAME := libmkl_rt
1066-
endif
1067-
10681051
ifeq ($(HAVE_SSP),1)
10691052
JCPPFLAGS += -DHAVE_SSP=1
10701053
ifeq ($(USEGCC),1)

Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,6 @@ JL_PRIVATE_LIBS := ccalltest
246246
ifeq ($(USE_GPL_LIBS), 1)
247247
JL_PRIVATE_LIBS += suitesparse_wrapper
248248
endif
249-
ifeq ($(USE_SYSTEM_FFTW),0)
250-
ifeq ($(USE_GPL_LIBS), 1)
251-
JL_PRIVATE_LIBS += fftw3 fftw3f fftw3_threads fftw3f_threads
252-
endif
253-
endif
254249
ifeq ($(USE_SYSTEM_PCRE),0)
255250
JL_PRIVATE_LIBS += pcre
256251
endif

README.arm.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ adding the following lines in `Make.user`:
2727
override USE_SYSTEM_BLAS=1
2828
override USE_SYSTEM_LAPACK=1
2929
override USE_SYSTEM_LIBM=1
30-
override USE_SYSTEM_FFTW=1
3130
override USE_SYSTEM_GMP=1
3231
override USE_SYSTEM_MPFR=1
3332
override USE_SYSTEM_ARPACK=1
@@ -36,7 +35,7 @@ override USE_SYSTEM_ARPACK=1
3635
The following command will install all the necessary libraries on Ubuntu:
3736

3837
````
39-
sudo apt-get install libblas3gf liblapack3gf libarpack2 libfftw3-dev libgmp3-dev \
38+
sudo apt-get install libblas3gf liblapack3gf libarpack2 libgmp3-dev \
4039
libmpfr-dev libblas-dev liblapack-dev cmake gcc-4.8 \
4140
g++-4.8 gfortran libgfortran3 m4 libedit-dev
4241
````

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ Julia uses the following external libraries, which are automatically downloaded
295295
- **[AMOS]** — subroutines for computing Bessel and Airy functions.
296296
- **[SuiteSparse]** (>= 4.1) — library of linear algebra routines for sparse matrices.
297297
- **[ARPACK]** — collection of subroutines designed to solve large, sparse eigenvalue problems.
298-
- **[FFTW]** (>= 3.3) — library for computing fast Fourier transforms very quickly and efficiently.
299298
- **[PCRE]** (>= 10.00) — Perl-compatible regular expressions library.
300299
- **[GMP]** (>= 5.0) — GNU multiple precision arithmetic library, needed for `BigInt` support.
301300
- **[MPFR]** (>= 3.0) — GNU multiple precision floating point library, needed for arbitrary precision floating point (`BigFloat`) support.
@@ -327,7 +326,6 @@ Julia uses the following external libraries, which are automatically downloaded
327326
[SuiteSparse]: http://faculty.cse.tamu.edu/davis/suitesparse.html
328327
[AMOS]: http://netlib.org/amos
329328
[ARPACK]: http://forge.scilab.org/index.php/p/arpack-ng
330-
[FFTW]: http://www.fftw.org
331329
[PCRE]: http://www.pcre.org
332330
[LLVM]: http://www.llvm.org
333331
[FemtoLisp]: https://github.com/JeffBezanson/femtolisp
@@ -368,7 +366,6 @@ Add the following to the `Make.user` file:
368366
USEICC = 1
369367
USEIFC = 1
370368
USE_INTEL_MKL = 1
371-
USE_INTEL_MKL_FFT = 1
372369
USE_INTEL_LIBM = 1
373370

374371
It is highly recommended to start with a fresh clone of the Julia repository.

base/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ ifeq ($(USE_GPL_LIBS), 1)
5353
else
5454
@echo "const USE_GPL_LIBS = false" >> $@
5555
endif
56-
@echo "const libfftw_name = \"$(LIBFFTWNAME)\"" >> $@
57-
@echo "const libfftwf_name = \"$(LIBFFTWFNAME)\"" >> $@
5856
@echo "const libllvm_version_string = \"$$($(LLVM_CONFIG_HOST) --version)\"" >> $@
5957
@echo "const VERSION_STRING = \"$(JULIA_VERSION)\"" >> $@
6058
@echo "const TAGGED_RELEASE_BANNER = \"$(TAGGED_RELEASE_BANNER)\"" >> $@

base/deprecated.jl

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,57 @@ module Operators
14341434
end
14351435
export Operators
14361436

1437+
# PR #21956
1438+
# This mimics the structure as it was defined in Base to avoid directly breaking code
1439+
# that assumes this structure
1440+
module DFT
1441+
for f in [:bfft, :bfft!, :brfft, :dct, :dct!, :fft, :fft!, :fftshift, :idct, :idct!,
1442+
:ifft, :ifft!, :ifftshift, :irfft, :plan_bfft, :plan_bfft!, :plan_brfft,
1443+
:plan_dct, :plan_dct!, :plan_fft, :plan_fft!, :plan_idct, :plan_idct!,
1444+
:plan_ifft, :plan_ifft!, :plan_irfft, :plan_rfft, :rfft]
1445+
pkg = endswith(String(f), "shift") ? "AbstractFFTs" : "FFTW"
1446+
@eval begin
1447+
function $f(args...; kwargs...)
1448+
error($f, " has been moved to the package $($pkg).jl.\n",
1449+
"Run `Pkg.add(\"$($pkg)\")` to install $($pkg) then run `using $($pkg)` ",
1450+
"to load it.")
1451+
end
1452+
export $f
1453+
end
1454+
end
1455+
module FFTW
1456+
for f in [:r2r, :r2r!, :plan_r2r, :plan_r2r!]
1457+
@eval begin
1458+
function $f(args...; kwargs...)
1459+
error($f, " has been moved to the package FFTW.jl.\n",
1460+
"Run `Pkg.add(\"FFTW\")` to install FFTW then run `using FFTW` ",
1461+
"to load it.")
1462+
end
1463+
export $f
1464+
end
1465+
end
1466+
end
1467+
export FFTW
1468+
end
1469+
using .DFT
1470+
for f in names(DFT)
1471+
@eval export $f
1472+
end
1473+
module DSP
1474+
for f in [:conv, :conv2, :deconv, :filt, :filt!, :xcorr]
1475+
@eval begin
1476+
function $f(args...; kwargs...)
1477+
error($f, " has been moved to the package DSP.jl.\n",
1478+
"Run `Pkg.add(\"DSP\")` to install DSP then run `using DSP` ",
1479+
"to load it.")
1480+
end
1481+
export $f
1482+
end
1483+
end
1484+
end
1485+
using .DSP
1486+
export conv, conv2, deconv, filt, filt!, xcorr
1487+
14371488
# END 0.7 deprecations
14381489

14391490
# BEGIN 1.0 deprecations

0 commit comments

Comments
 (0)