From 37e6390c4509aab541f3396e3cea91f7b20790aa Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Wed, 14 Jan 2015 14:42:55 -0500 Subject: [PATCH] add type assertions to work around inference problem (fix #9772) --- base/fft/ctfft.jl | 4 ++-- base/fft/fftn.jl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/fft/ctfft.jl b/base/fft/ctfft.jl index 3c58d49f1a73b..c4fc10fb1a758 100644 --- a/base/fft/ctfft.jl +++ b/base/fft/ctfft.jl @@ -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, diff --git a/base/fft/fftn.jl b/base/fft/fftn.jl index 8e9bf8c6aa5a6..6a0e10ae1fbe7 100644 --- a/base/fft/fftn.jl +++ b/base/fft/fftn.jl @@ -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):