Skip to content

Commit

Permalink
add type assertions to work around inference problem (fix #9772)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored and yuyichao committed Feb 26, 2016
1 parent d0fb7a3 commit 37e6390
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions base/fft/ctfft.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ function CTPlan{Tr<:FloatingPoint}(::Type{Complex{Tr}}, forward::Bool, n::Int)
end

plan_fft{Tr<:FloatingPoint}(x::AbstractVector{Complex{Tr}}) =
CTPlan(Complex{Tr}, true, length(x))
CTPlan(Complex{Tr}, true, length(x))::CTPlan{Complex{Tr},true}
plan_bfft{Tr<:FloatingPoint}(x::AbstractVector{Complex{Tr}}) =
CTPlan(Complex{Tr}, false, length(x))
CTPlan(Complex{Tr}, false, length(x))::CTPlan{Complex{Tr},false}

function applystep{T}(p::CTPlan{T},
x::AbstractArray{T}, x0, xs,
Expand Down
4 changes: 2 additions & 2 deletions base/fft/fftn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ function MultiDimPlan{T<:Complex}(::Type{T}, forward::Bool, region, sz)
end

plan_fft{Tr<:FloatingPoint}(x::AbstractArray{Complex{Tr}}, region) =
MultiDimPlan(Complex{Tr}, true, region, size(x))
MultiDimPlan(Complex{Tr}, true, region, size(x))::MultiDimPlan{Complex{Tr}, true}
plan_bfft{Tr<:FloatingPoint}(x::AbstractArray{Complex{Tr}}, region) =
MultiDimPlan(Complex{Tr}, false, region, size(x))
MultiDimPlan(Complex{Tr}, false, region, size(x))::MultiDimPlan{Complex{Tr}, false}

# recursive execution of a MultiDim plan, starting at dimension d, for
# strided arrays (so that we can use linear indexing):
Expand Down

0 comments on commit 37e6390

Please sign in to comment.