-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type-flexible FFTs? #34
Comments
Have you checked out https://github.com/JuliaApproximation/FastTransforms.jl? It has methods for FFT with arbitrary Julia types |
Seems reasonable to make this more generic; it looks like a legacy of the days when FFTW was the only FFT. |
I haven't looked into it further. I assume that if you use |
I've almost finished extending the |
@milankl I'm looking for an example (or examples) where FFT, IFFT is evaluated with Posits in particular with Poist16 (SoftPosit.jl)? It would be great if you can point me towards one |
Technically this should work julia> using SoftPosit, FastTransforms
julia> x = Posit16.(rand(8))
8-element Vector{Posit16}:
Posit16(0.6254883)
Posit16(0.7780762)
Posit16(0.8145752)
Posit16(0.50598145)
Posit16(0.74768066)
Posit16(0.29797363)
Posit16(0.89624023)
Posit16(0.6437988)
julia> fft(x)
ERROR: MethodError: no method matching maxintfloat(::Type{Posit16}) But it doesn't because I haven't implemented the necessary methods in SoftPosit.jl, so we should move this into an issue therein: milankl/SoftPosit.jl#64 |
@milankl Great! Looking forward for the upgrade! |
I've raised this issue JuliaDSP/FourierTransforms.jl#8 (comment), which is about
AbstractFFTs.jl/src/definitions.jl
Lines 20 to 22 in 66695a7
In theory,
FourierTransforms.jl
should allow for a type-flexible FFT, i.e.fft(::Array{T,1}) where {T<:AbstractFloat}
, but currently it doesn't. Would it be possible to change these lines thanks to the pure-JuliaFourierTransforms.jl
, which is not limited toFloat32/Float64
(as for example FFTW is)?The text was updated successfully, but these errors were encountered: