Skip to content

Commit a516bd0

Browse files
committed
Overload only _fftfloat
1 parent 4943167 commit a516bd0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ext/AbstractFFTsForwardDiffExt.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ import ForwardDiff: Dual
77
import AbstractFFTs: Plan, mul!, dualplan, dual2array
88

99

10-
AbstractFFTs.complexfloat(x::AbstractArray{<:Dual}) = AbstractFFTs.complexfloat.(x)
11-
AbstractFFTs.complexfloat(d::Dual{T,V,N}) where {T,V,N} = convert(Dual{T,float(V),N}, d) + 0im
12-
13-
AbstractFFTs.realfloat(x::AbstractArray{<:Dual}) = AbstractFFTs.realfloat.(x)
14-
AbstractFFTs.realfloat(d::Dual{T,V,N}) where {T,V,N} = convert(Dual{T,float(V),N}, d)
10+
AbstractFFTs._fftfloat(::Type{Dual{T,V,N}}) where {T,V,N} = Dual{T,AbstractFFTs._fftfloat(V),N}
1511

1612
dual2array(x::Array{<:Dual{Tag,T}}) where {Tag,T} = reinterpret(reshape, T, x)
1713
dual2array(x::Array{<:Complex{<:Dual{Tag, T}}}) where {Tag,T} = complex.(dual2array(real(x)), dual2array(imag(x)))

0 commit comments

Comments
 (0)