Define fft_plan! for nested array

Hi, I have a nested array Array{SVector{n},2}, which is a 2D array of n-SVectors. I would like to perform in-place fft to each component of the n-SVectors. This is what worked for me:

julia> A=rand(SVector{2,ComplexF64},5,5);

julia> Ar=reinterpret(reshape,eltype(A[1,1]),A);

julia> fft!(Ar,(2,3));

My question is, is there a way to create a fft_plan! type of object, such that when this same operation need to be performed on the same type / size of arrays, I don’t have to reinterpret every single time?

Yes, since the underlying FFTW library can handle this, but you’d have to dig into the low-level depths of FFTW.jl.