Skip to content

Commit

Permalink
Add Compat and bump AbstractFFTs dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Jul 20, 2017
1 parent ca7f37b commit feb7c5f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 23 deletions.
5 changes: 3 additions & 2 deletions REQUIRE
@@ -1,5 +1,6 @@
julia 0.6.0-rc1
AbstractFFTs
julia 0.6.0
AbstractFFTs 0.2.0
Compat 0.27.0
BinDeps 0.6.0
@osx Homebrew
@windows WinRPM
11 changes: 6 additions & 5 deletions deps/build.jl
Expand Up @@ -3,12 +3,13 @@
VERSION >= v"0.7.0-DEV.602" && include_string("""
using BinDeps
using BinDeps: builddir
using Compat.Sys: iswindows, isapple
BinDeps.@setup
const FFTW_VER = v"3.3.6-pl1"
if is_windows()
if iswindows()
const libfftw_name = "libfftw3"
const libfftwf_name = "libfftw3f"
else
Expand Down Expand Up @@ -39,10 +40,10 @@ provides(Zypper, "libfftw3_threads3", [libfftw, libfftwf], os=:Linux)
provides(Yum, "fftw-libs", [libfftw, libfftwf], os=:Linux)
provides(BSDPkg, "fftw3", [libfftw, libfftwf], os=:FreeBSD)
if is_windows()
if iswindows()
using WinRPM
provides(WinRPM.RPM, "libfftw3-3", [libfftw, libfftwf], os=:Windows)
elseif is_apple()
elseif isapple()
using Homebrew
provides(Homebrew.HB, "fftw", [libfftw, libfftwf], os=:Darwin)
end
Expand All @@ -60,7 +61,7 @@ elseif Sys.ARCH === :x86_64
append!(fftw_config, ["--enable-sse2", "--enable-fma"])
end
if is_windows()
if iswindows()
append!(fftw_config, ["--with-our-malloc", "--with-combined-threads"])
Sys.ARCH === :x86_64 || push!(fftw_config, "--with-incoming-stack-boundary=2")
end
Expand All @@ -86,7 +87,7 @@ provides(BuildProcess, (@build_steps begin
end
end), [libfftw, libfftwf])
if is_windows()
if iswindows()
BinDeps.@install Dict([:libfftw3 => :libfftw, :libfftw3f => :libfftwf])
else
BinDeps.@install Dict([:libfftw3_threads => :libfftw, :libfftw3f_threads => :libfftwf])
Expand Down
7 changes: 3 additions & 4 deletions src/package.jl
Expand Up @@ -2,9 +2,8 @@ __precompile__()

module FFTW

# Since nothing is exported from AbstractFFTs as long as the FFT functionality is
# defined and not deprecated in Base, we need to be very explicit about the things we
# want to import
using Compat

import AbstractFFTs: Plan, ScaledPlan,
fft, ifft, bfft, fft!, ifft!, bfft!,
plan_fft, plan_ifft, plan_bfft, plan_fft!, plan_ifft!, plan_bfft!,
Expand Down Expand Up @@ -33,7 +32,7 @@ fftw_vendor() = Base.BLAS.vendor() === :mkl ? :mkl : :fftw
if fftw_vendor() === :mkl
const libfftw_name = "libmkl_rt"
const libfftwf_name = "libmkl_rt"
elseif Sys.KERNEL in [:Windows, :NT]
elseif Compat.Sys.iswindows()
const libfftw_name = "libfftw3"
const libfftwf_name = "libfftw3f"
else
Expand Down
16 changes: 4 additions & 12 deletions test/runtests.jl
@@ -1,22 +1,14 @@
# This file was formerly a part of Julia. License is MIT: https://julialang.org/license
using FFTW
using AbstractFFTs
using AbstractFFTs: Plan, plan_inv
using Base.Test

importall FFTW
if VERSION >= v"0.7.0-DEV.602"
import AbstractFFTs: Plan, fft, ifft, bfft, fft!, ifft!, bfft!,
plan_fft, plan_ifft, plan_bfft, plan_fft!, plan_ifft!, plan_bfft!,
rfft, irfft, brfft, plan_rfft, plan_irfft, plan_brfft,
fftshift, ifftshift, plan_inv
import FFTW: fftw_vendor
using FFTW: fftw_vendor
else
import Base.DFT: Plan, fft, ifft, bfft, fft!, ifft!, bfft!,
plan_fft, plan_ifft, plan_bfft, plan_fft!, plan_ifft!, plan_bfft!,
rfft, irfft, brfft, plan_rfft, plan_irfft, plan_brfft,
fftshift, ifftshift, plan_inv
import Base: fftw_vendor
using Base: fftw_vendor
end
import FFTW: dct, idct, dct!, idct!, plan_dct, plan_idct, plan_dct!, plan_idct!

# Base Julia issue #19892
# (test this first to make sure it happens before set_num_threads)
Expand Down

0 comments on commit feb7c5f

Please sign in to comment.