GNU Info

Info Node: (fftw.info)Column-major Format

(fftw.info)Column-major Format


Next: Static Arrays in C Prev: Row-major Format Up: Multi-dimensional Array Format
Enter node , (file) or (file)node

Column-major Format
-------------------

   Readers from the Fortran world are used to arrays stored in
"column-major" order (sometimes called "Fortran order").  This is
essentially the exact opposite of row-major order in that, here, the
*first* dimension's index varies most quickly.

   If you have an array stored in column-major order and wish to
transform it using `fftwnd', it is quite easy to do.  When creating the
plan, simply pass the dimensions of the array to `fftwnd_create_plan' 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 `fftwnd').  This is done for you automatically by the
FFTW Fortran wrapper routines (Note: Calling FFTW from Fortran.).


automatically generated by info2www version 1.2.2.9