I find the armadillo C++ library very convenient for matrix computations. How does one perform a two dimensional FFT on armadillo matrices using the FFTW library?
I understand that armadillo matrix class stores data in a column major order. How do I pass this to FFTW? The fftw 3.3.3 documentation says
If you have an array stored in column-major order and wish to transform it using FFTW, it is quite easy to do. When creating the plan, simply pass the dimensions of the array to the planner in reverse order. For example, if your array is a rank three N x M x L matrix in column-major order, you should pass the dimensions of the array as if it were an L x M x N matrix (which it is, from the perspective of FFTW)
I cannot fully understand what this means, given the syntax for creating a plan is as follows.
fftw_plan fftw_plan_dft_2d(int n0, int n1,
fftw_complex *in, fftw_complex *out,
int sign, unsigned flags);
Could someone explain this?