Skip to content

inverse of bfft plan not supported #10

@daanhb

Description

@daanhb
julia> using GenericFFT

julia> P = plan_bfft(zeros(BigFloat, 16))
GenericFFT.DummybFFTPlan{Complex{BigFloat}, false, UnitRange{Int64}}(1:1, #undef)

julia> inv(P)
ERROR: MethodError: no method matching plan_inv(::GenericFFT.DummybFFTPlan{Complex{BigFloat}, false, UnitRange{Int64}})

The likely reason is that the inverse of a bFFTPlan should be a ScaledPlan, which needs the dimension of the plan in order to compute the scale factor. However, our dummy plans do not currently store the size. Like this:

julia> P = plan_bfft(zeros(16))
FFTW backward plan for 16-element array of ComplexF64
(dft-direct-16 "n2bv_16_avx2_128")

julia> inv(P)
0.0625 * FFTW forward plan for 16-element array of ComplexF64
(dft-direct-16 "n2fv_16_avx2_128")

julia> typeof(inv(P))
AbstractFFTs.ScaledPlan{ComplexF64, FFTW.cFFTWPlan{ComplexF64, -1, false, 1, UnitRange{Int64}}, Float64}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions