|
AbstractFFTs.complexfloat(x::StridedArray{Complex{<:AbstractFloat}}) = x |
|
AbstractFFTs.realfloat(x::StridedArray{<:Real}) = x |
|
# We override this one in order to avoid throwing an error that the type is |
|
# unsupported (as defined in AbstractFFTs) |
|
AbstractFFTs._fftfloat(::Type{T}) where {T <: AbstractFloat} = T |
|
# We also avoid any conversion of types that are already AbstractFloat |
|
# (since AbstractFFTs calls float(x) by default, which might change types) |
|
AbstractFFTs.fftfloat(x::AbstractFloat) = x |
|
# for compatibility with AbstractFFTs |
|
AbstractFFTs.fftfloat(x::Float16) = Float32(x) |
These should ideally be moved to AbstractFFTs to reduce the type-piracy in this package.
GenericFFT.jl/src/GenericFFT.jl
Lines 24 to 33 in 2e55016
These should ideally be moved to AbstractFFTs to reduce the type-piracy in this package.