Skip to content

Commit

Permalink
add type assertions to work around inference problem (fix JuliaLang#9772
Browse files Browse the repository at this point in the history
)
  • Loading branch information
stevengj committed Jan 14, 2015
1 parent 5059e08 commit 00614f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/fft/FFTW.jl
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ for (Tr,Tc) in ((:Float32,:Complex64),(:Float64,:Complex128))
flags::Integer=ESTIMATE, timelimit::Real=NO_TIMELIMIT)
osize = rfft_output_size(X, region)
Y = flags&ESTIMATE != 0 ? FakeArray($Tc,osize...) : Array($Tc,osize...)
rFFTWPlan(X, Y, region, flags, timelimit)
rFFTWPlan(X, Y, region, flags, timelimit)::rFFTWPlan{$Tr,FORWARD,false}
end

function plan_brfft(X::StridedArray{$Tc}, d::Integer, region;
Expand All @@ -641,7 +641,7 @@ for (Tr,Tc) in ((:Float32,:Complex64),(:Float64,:Complex128))
else
Xc = copy(X)
rFFTWPlan(X, Y, region, flags, timelimit)
end
end::rFFTWPlan{$Tc,BACKWARD,false}
end

plan_rfft(X::StridedArray{$Tr};kws...)=plan_rfft(X,1:ndims(X);kws...)
Expand All @@ -652,14 +652,14 @@ for (Tr,Tc) in ((:Float32,:Complex64),(:Float64,:Complex128))
Y = p.flags&ESTIMATE != 0 ? FakeArray($Tc,p.osz) : Array($Tc,p.osz)
ScaledPlan(rFFTWPlan(Y, X, p.region,
length(p.region)<=1 ? p.flags | PRESERVE_INPUT
: p.flags, NO_TIMELIMIT),
: p.flags, NO_TIMELIMIT)::rFFTWPlan{$Tc,BACKWARD,false},
normalization(X, p.region))
end

function plan_inv(p::rFFTWPlan{$Tc,BACKWARD,false})
X = Array($Tc, p.sz)
Y = p.flags&ESTIMATE != 0 ? FakeArray($Tr,p.osz) : Array($Tr,p.osz)
ScaledPlan(rFFTWPlan(Y, X, p.region, p.flags, NO_TIMELIMIT),
ScaledPlan(rFFTWPlan(Y, X, p.region, p.flags, NO_TIMELIMIT)::rFFTWPlan{$Tr,FORWARD,false},
normalization(Y, p.region))
end

Expand Down

0 comments on commit 00614f0

Please sign in to comment.