Skip to content

Commit

Permalink
Remove the FFTW bindings from Base
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed May 23, 2017
1 parent 41b8377 commit 22a71f2
Show file tree
Hide file tree
Showing 32 changed files with 54 additions and 2,495 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ before_install:
BUILDOPTS="-j3 USECLANG=1 LLVM_CONFIG=$(brew --prefix llvm39-julia)/bin/llvm-config LLVM_SIZE=$(brew --prefix llvm39-julia)/bin/llvm-size";
BUILDOPTS="$BUILDOPTS VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC=-I$(brew --prefix suite-sparse-julia)/include FORCE_ASSERTIONS=1";
BUILDOPTS="$BUILDOPTS LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas";
for lib in LLVM SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND; do
for lib in LLVM SUITESPARSE ARPACK BLAS LAPACK GMP MPFR PCRE LIBUNWIND; do
BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1";
done;
export LDFLAGS="-L$(brew --prefix openblas-julia)/lib -L$(brew --prefix suite-sparse-julia)/lib";
Expand Down
5 changes: 2 additions & 3 deletions DISTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ separated most of the notes by OS.
Note that while the code for Julia is
[MIT-licensed, with a few exceptions](https://github.com/JuliaLang/julia/blob/master/LICENSE.md),
the distribution created by the techniques described herein will be
GPL licensed, as various dependent libraries such as `FFTW` and
`SuiteSparse` are GPL licensed. We do hope to have a
non-GPL distribution of Julia in the future.
GPL licensed, as various dependent libraries such as `SuiteSparse` are
GPL licensed. We do hope to have a non-GPL distribution of Julia in the future.

Versioning and Git
------------------
Expand Down
1 change: 0 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ their own licenses:
- [OPENLIBM](https://github.com/JuliaLang/openlibm/blob/master/LICENSE.md) [MIT, BSD-2, ISC]
- [OPENSPECFUN](https://github.com/JuliaLang/openspecfun) [MIT, public domain]
- [FADDEEVA](http://ab-initio.mit.edu/Faddeeva) [MIT]
- [FFTW](http://fftw.org/doc/License-and-Copyright.html) [GPL2+]
- [GMP](http://gmplib.org/manual/Copying.html#Copying) [LGPL3+ or GPL2+]
- [LIBGIT2](https://github.com/libgit2/libgit2/blob/development/COPYING) [GPL2+ with unlimited linking exception]
- [CURL](https://curl.haxx.se/docs/copyright.html) [MIT/X derivative]
Expand Down
17 changes: 0 additions & 17 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ USE_SYSTEM_OPENSPECFUN:=0
USE_SYSTEM_DSFMT:=0
USE_SYSTEM_BLAS:=0
USE_SYSTEM_LAPACK:=0
USE_SYSTEM_FFTW:=0
USE_SYSTEM_GMP:=0
USE_SYSTEM_MPFR:=0
USE_SYSTEM_ARPACK:=0
Expand All @@ -53,8 +52,6 @@ USE_LLVM_SHLIB := 1
## Settings for various Intel tools
# Set to 1 to use MKL
USE_INTEL_MKL ?= 0
# Set to 1 to use MKL FFT
USE_INTEL_MKL_FFT ?= 0
# Set to 1 to use Intel LIBM
USE_INTEL_LIBM ?= 0
# Set to 1 to enable profiling with Intel VTune Amplifier
Expand Down Expand Up @@ -832,14 +829,6 @@ LIBLAPACKNAME := liblapack
endif
endif

ifeq ($(OS), WINNT)
LIBFFTWNAME := libfftw3
LIBFFTWFNAME := libfftw3f
else
LIBFFTWNAME := libfftw3_threads
LIBFFTWFNAME := libfftw3f_threads
endif

ifeq ($(USE_SYSTEM_LIBM), 1)
LIBM := -lm
LIBMNAME := libm
Expand Down Expand Up @@ -1023,12 +1012,6 @@ LIBBLAS := $(MKL_LDFLAGS)
LIBLAPACK := $(MKL_LDFLAGS)
endif

ifeq ($(USE_INTEL_MKL_FFT), 1)
USE_SYSTEM_FFTW := 1
LIBFFTWNAME := libmkl_rt
LIBFFTWFNAME := libmkl_rt
endif

ifeq ($(HAVE_SSP),1)
JCPPFLAGS += -DHAVE_SSP=1
ifeq ($(USEGCC),1)
Expand Down
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,6 @@ JL_PRIVATE_LIBS := ccalltest
ifeq ($(USE_GPL_LIBS), 1)
JL_PRIVATE_LIBS += suitesparse_wrapper
endif
ifeq ($(USE_SYSTEM_FFTW),0)
ifeq ($(USE_GPL_LIBS), 1)
JL_PRIVATE_LIBS += fftw3 fftw3f fftw3_threads fftw3f_threads
endif
endif
ifeq ($(USE_SYSTEM_PCRE),0)
JL_PRIVATE_LIBS += pcre
endif
Expand Down
3 changes: 1 addition & 2 deletions README.arm.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ adding the following lines in `Make.user`:
override USE_SYSTEM_BLAS=1
override USE_SYSTEM_LAPACK=1
override USE_SYSTEM_LIBM=1
override USE_SYSTEM_FFTW=1
override USE_SYSTEM_GMP=1
override USE_SYSTEM_MPFR=1
override USE_SYSTEM_ARPACK=1
Expand All @@ -36,7 +35,7 @@ override USE_SYSTEM_ARPACK=1
The following command will install all the necessary libraries on Ubuntu:

````
sudo apt-get install libblas3gf liblapack3gf libarpack2 libfftw3-dev libgmp3-dev \
sudo apt-get install libblas3gf liblapack3gf libarpack2 libgmp3-dev \
libmpfr-dev libblas-dev liblapack-dev cmake gcc-4.8 \
g++-4.8 gfortran libgfortran3 m4 libedit-dev
````
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ Julia uses the following external libraries, which are automatically downloaded
- **[AMOS]** — subroutines for computing Bessel and Airy functions.
- **[SuiteSparse]** (>= 4.1) — library of linear algebra routines for sparse matrices.
- **[ARPACK]** — collection of subroutines designed to solve large, sparse eigenvalue problems.
- **[FFTW]** (>= 3.3) — library for computing fast Fourier transforms very quickly and efficiently.
- **[PCRE]** (>= 10.00) — Perl-compatible regular expressions library.
- **[GMP]** (>= 5.0) — GNU multiple precision arithmetic library, needed for `BigInt` support.
- **[MPFR]** (>= 3.0) — GNU multiple precision floating point library, needed for arbitrary precision floating point (`BigFloat`) support.
Expand Down Expand Up @@ -309,7 +308,6 @@ Julia uses the following external libraries, which are automatically downloaded
[SuiteSparse]: http://faculty.cse.tamu.edu/davis/suitesparse.html
[AMOS]: http://netlib.org/amos
[ARPACK]: http://forge.scilab.org/index.php/p/arpack-ng
[FFTW]: http://www.fftw.org
[PCRE]: http://www.pcre.org
[LLVM]: http://www.llvm.org
[FemtoLisp]: https://github.com/JeffBezanson/femtolisp
Expand Down Expand Up @@ -350,7 +348,6 @@ Add the following to the `Make.user` file:
USEICC = 1
USEIFC = 1
USE_INTEL_MKL = 1
USE_INTEL_MKL_FFT = 1
USE_INTEL_LIBM = 1

It is highly recommended to start with a fresh clone of the Julia repository.
Expand Down
2 changes: 0 additions & 2 deletions base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ ifeq ($(USE_GPL_LIBS), 1)
else
@echo "const USE_GPL_LIBS = false" >> $@
endif
@echo "const libfftw_name = \"$(LIBFFTWNAME)\"" >> $@
@echo "const libfftwf_name = \"$(LIBFFTWFNAME)\"" >> $@
@echo "const libllvm_version = \"$$($(LLVM_CONFIG_HOST) --version)\"" >> $@
@echo "const VERSION_STRING = \"$(JULIA_VERSION)\"" >> $@
@echo "const TAGGED_RELEASE_BANNER = \"$(TAGGED_RELEASE_BANNER)\"" >> $@
Expand Down
43 changes: 43 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,49 @@ end
@deprecate srand(filename::AbstractString, n::Integer=4) srand(read!(filename, Array{UInt32}(Int(n))))
@deprecate MersenneTwister(filename::AbstractString) srand(MersenneTwister(0), read!(filename, Array{UInt32}(Int(4))))

# PR #21956
macro _depfftw(f)
quote
function $(esc(f))(args...; kwargs...)
error($f, " has been moved to the package FFTW.jl.\n",
"Run `Pkg.add(\"FFTW\")` to install FFTW on Julia v0.7 and later, ",
"and then run `using FFTW` to load it.")
end
export $(esc(f))
end
end
function _fftwie(mod::Module)
s = Symbol(mod)
vars = filter(n -> n !== s, names(mod))
imports = map(v -> Expr(:import, s, v), vars)
return Expr(:toplevel, imports..., Expr(:export, vars...))
end

module DFT
for f in [:bfft, :bfft!, :brfft, :dct, :dct!, :fft, :fft!, :fftshift, :idct, :idct!,
:ifft, :ifft!, :ifftshift, :irfft, :plan_bfft, :plan_bfft!, :plan_brfft,
:plan_dct, :plan_dct!, :plan_fft, :plan_fft!, :plan_idct, :plan_idct!,
:plan_ifft, :plan_ifft!, :plan_irfft, :plan_rfft, :rfft]
@eval Base.@_depfftw($f)
end
module FFTW
for f in [:r2r, :r2r!, :plan_r2r, :plan_r2r!]
@eval Base.@_depfftw($f)
end
end
end
@eval _fftwie($DFT)

const FFTW = DFT.FFTW
export FFTW

module DSP
for f in [:conv, :conv2, :deconv, :filt, :filt!, :xcorr]
@eval Base.@_depfftw($f)
end
end
@eval _fftwie($DSP)

# END 0.7 deprecations

# BEGIN 1.0 deprecations
Expand Down
Loading

0 comments on commit 22a71f2

Please sign in to comment.