Five argument mul! in FFTW

I couldn’t find a 5 argument method of mul! in FFTW.jl for FFTW.rFFTWPlan and its siblings. Would it be reasonable to add such methods? In particular, I would like to be able to do something like

julia> using LinearAlgebra, FFTW

julia> x = Vector(range(0., 1., length=16));

julia> rfft_plan = plan_rfft(x);

julia> y = rfft_plan * x; y .= 1;

julia> mul!(y, rfft_plan, x);

julia> mul!(y, rfft_plan, x, 1.0, 0.5) # this yields a MethodError

Can you help by describing what you’re trying to accomplish with the 2 arguments in your mul! call?

I think that the answer to your question however is no, but there might be an inplace approach for what you’re trying to do.

I’m also unsure what the third line of code is accomplishing, are you trying to allocate a temporary so that you can use the in place mul function below?

The underlying FFTW library doesn’t support these operations, so any implementation would be no better than what you would implement on your own.

1 Like

Cross reference:
As described by stevengj, such a functionality is not implemented in FFTW and thus not available in Julia.