Skip to content

Commit 22a71f2

Browse files
committed
Remove the FFTW bindings from Base
1 parent 41b8377 commit 22a71f2

32 files changed

+54
-2495
lines changed

.travis.yml

+1-1
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

+2-3
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

-1
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

-17
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ USE_SYSTEM_OPENSPECFUN:=0
3434
USE_SYSTEM_DSFMT:=0
3535
USE_SYSTEM_BLAS:=0
3636
USE_SYSTEM_LAPACK:=0
37-
USE_SYSTEM_FFTW:=0
3837
USE_SYSTEM_GMP:=0
3938
USE_SYSTEM_MPFR:=0
4039
USE_SYSTEM_ARPACK:=0
@@ -53,8 +52,6 @@ USE_LLVM_SHLIB := 1
5352
## Settings for various Intel tools
5453
# Set to 1 to use MKL
5554
USE_INTEL_MKL ?= 0
56-
# Set to 1 to use MKL FFT
57-
USE_INTEL_MKL_FFT ?= 0
5855
# Set to 1 to use Intel LIBM
5956
USE_INTEL_LIBM ?= 0
6057
# Set to 1 to enable profiling with Intel VTune Amplifier
@@ -832,14 +829,6 @@ LIBLAPACKNAME := liblapack
832829
endif
833830
endif
834831

835-
ifeq ($(OS), WINNT)
836-
LIBFFTWNAME := libfftw3
837-
LIBFFTWFNAME := libfftw3f
838-
else
839-
LIBFFTWNAME := libfftw3_threads
840-
LIBFFTWFNAME := libfftw3f_threads
841-
endif
842-
843832
ifeq ($(USE_SYSTEM_LIBM), 1)
844833
LIBM := -lm
845834
LIBMNAME := libm
@@ -1023,12 +1012,6 @@ LIBBLAS := $(MKL_LDFLAGS)
10231012
LIBLAPACK := $(MKL_LDFLAGS)
10241013
endif
10251014

1026-
ifeq ($(USE_INTEL_MKL_FFT), 1)
1027-
USE_SYSTEM_FFTW := 1
1028-
LIBFFTWNAME := libmkl_rt
1029-
LIBFFTWFNAME := libmkl_rt
1030-
endif
1031-
10321015
ifeq ($(HAVE_SSP),1)
10331016
JCPPFLAGS += -DHAVE_SSP=1
10341017
ifeq ($(USEGCC),1)

Makefile

-5
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,6 @@ JL_PRIVATE_LIBS := ccalltest
245245
ifeq ($(USE_GPL_LIBS), 1)
246246
JL_PRIVATE_LIBS += suitesparse_wrapper
247247
endif
248-
ifeq ($(USE_SYSTEM_FFTW),0)
249-
ifeq ($(USE_GPL_LIBS), 1)
250-
JL_PRIVATE_LIBS += fftw3 fftw3f fftw3_threads fftw3f_threads
251-
endif
252-
endif
253248
ifeq ($(USE_SYSTEM_PCRE),0)
254249
JL_PRIVATE_LIBS += pcre
255250
endif

README.arm.md

+1-2
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

-3
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ Julia uses the following external libraries, which are automatically downloaded
277277
- **[AMOS]** — subroutines for computing Bessel and Airy functions.
278278
- **[SuiteSparse]** (>= 4.1) — library of linear algebra routines for sparse matrices.
279279
- **[ARPACK]** — collection of subroutines designed to solve large, sparse eigenvalue problems.
280-
- **[FFTW]** (>= 3.3) — library for computing fast Fourier transforms very quickly and efficiently.
281280
- **[PCRE]** (>= 10.00) — Perl-compatible regular expressions library.
282281
- **[GMP]** (>= 5.0) — GNU multiple precision arithmetic library, needed for `BigInt` support.
283282
- **[MPFR]** (>= 3.0) — GNU multiple precision floating point library, needed for arbitrary precision floating point (`BigFloat`) support.
@@ -309,7 +308,6 @@ Julia uses the following external libraries, which are automatically downloaded
309308
[SuiteSparse]: http://faculty.cse.tamu.edu/davis/suitesparse.html
310309
[AMOS]: http://netlib.org/amos
311310
[ARPACK]: http://forge.scilab.org/index.php/p/arpack-ng
312-
[FFTW]: http://www.fftw.org
313311
[PCRE]: http://www.pcre.org
314312
[LLVM]: http://www.llvm.org
315313
[FemtoLisp]: https://github.com/JeffBezanson/femtolisp
@@ -350,7 +348,6 @@ Add the following to the `Make.user` file:
350348
USEICC = 1
351349
USEIFC = 1
352350
USE_INTEL_MKL = 1
353-
USE_INTEL_MKL_FFT = 1
354351
USE_INTEL_LIBM = 1
355352

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

base/Makefile

-2
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 = \"$$($(LLVM_CONFIG_HOST) --version)\"" >> $@
5957
@echo "const VERSION_STRING = \"$(JULIA_VERSION)\"" >> $@
6058
@echo "const TAGGED_RELEASE_BANNER = \"$(TAGGED_RELEASE_BANNER)\"" >> $@

base/deprecated.jl

+43
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,49 @@ end
13421342
@deprecate srand(filename::AbstractString, n::Integer=4) srand(read!(filename, Array{UInt32}(Int(n))))
13431343
@deprecate MersenneTwister(filename::AbstractString) srand(MersenneTwister(0), read!(filename, Array{UInt32}(Int(4))))
13441344

1345+
# PR #21956
1346+
macro _depfftw(f)
1347+
quote
1348+
function $(esc(f))(args...; kwargs...)
1349+
error($f, " has been moved to the package FFTW.jl.\n",
1350+
"Run `Pkg.add(\"FFTW\")` to install FFTW on Julia v0.7 and later, ",
1351+
"and then run `using FFTW` to load it.")
1352+
end
1353+
export $(esc(f))
1354+
end
1355+
end
1356+
function _fftwie(mod::Module)
1357+
s = Symbol(mod)
1358+
vars = filter(n -> n !== s, names(mod))
1359+
imports = map(v -> Expr(:import, s, v), vars)
1360+
return Expr(:toplevel, imports..., Expr(:export, vars...))
1361+
end
1362+
1363+
module DFT
1364+
for f in [:bfft, :bfft!, :brfft, :dct, :dct!, :fft, :fft!, :fftshift, :idct, :idct!,
1365+
:ifft, :ifft!, :ifftshift, :irfft, :plan_bfft, :plan_bfft!, :plan_brfft,
1366+
:plan_dct, :plan_dct!, :plan_fft, :plan_fft!, :plan_idct, :plan_idct!,
1367+
:plan_ifft, :plan_ifft!, :plan_irfft, :plan_rfft, :rfft]
1368+
@eval Base.@_depfftw($f)
1369+
end
1370+
module FFTW
1371+
for f in [:r2r, :r2r!, :plan_r2r, :plan_r2r!]
1372+
@eval Base.@_depfftw($f)
1373+
end
1374+
end
1375+
end
1376+
@eval _fftwie($DFT)
1377+
1378+
const FFTW = DFT.FFTW
1379+
export FFTW
1380+
1381+
module DSP
1382+
for f in [:conv, :conv2, :deconv, :filt, :filt!, :xcorr]
1383+
@eval Base.@_depfftw($f)
1384+
end
1385+
end
1386+
@eval _fftwie($DSP)
1387+
13451388
# END 0.7 deprecations
13461389

13471390
# BEGIN 1.0 deprecations

0 commit comments

Comments
 (0)