Skip to content

make FFTW a soft dependence #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ version = "0.8.8"

[deps]
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
FixedPointNumbers = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
Graphics = "a2bd30eb-e257-5431-a919-1863eab51364"
MappedArrays = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
PaddedViews = "5432bcbf-9aad-5242-b902-cca2824c8663"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"

[compat]
Colors = "0.9, 0.10, 0.11"
FFTW = "0.3, 1"
FixedPointNumbers = "0.6.1, 0.7"
Graphics = "0.4, 1.0"
MappedArrays = "0.2"
Expand All @@ -25,9 +24,10 @@ julia = "1"

[extras]
ColorVectorSpace = "c3611d14-8923-5661-9e6a-0046d554d3a4"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["ColorVectorSpace", "Random", "Statistics", "Test"]
test = ["ColorVectorSpace", "FFTW", "Random", "Statistics", "Test"]
6 changes: 5 additions & 1 deletion src/ImageCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ VERSION < v"0.7.0-beta2.199" && __precompile__()
module ImageCore

using Reexport
using Requires
@reexport using Colors
@reexport using FixedPointNumbers
using MappedArrays, PaddedViews, Graphics
Expand Down Expand Up @@ -99,7 +100,6 @@ include("stackedviews.jl")
include("convert_reinterpret.jl")
include("traits.jl")
include("map.jl")
include("functions.jl")
include("show.jl")
include("deprecations.jl")

Expand Down Expand Up @@ -154,4 +154,8 @@ function Base.transpose(a::AbstractVector{C}) where C<:Colorant
out
end

function __init__()
@require FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" include("functions.jl")
end

end ## module
2 changes: 1 addition & 1 deletion src/functions.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FFTW: fft, rfft, plan_fft, plan_rfft
import .FFTW: fft, rfft, plan_fft, plan_rfft

# It's better not to define fft on Colorant arrays, because keeping
# track of the color dimension and the fft-dims is prone to omissions
Expand Down
2 changes: 0 additions & 2 deletions test/functions.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using ImageCore, Colors, FixedPointNumbers
using FFTW
using Test

@testset "functions" begin
ag = rand(Gray{Float32}, 4, 5)
Expand Down