d@0: d@0: d@0: Column-major Format - FFTW 3.2.1 d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0:
d@0:

d@0: d@0: d@0: Next: , d@0: Previous: Row-major Format, d@0: Up: Multi-dimensional Array Format d@0:


d@0:
d@0: d@0:

3.2.2 Column-major Format

d@0: d@0:

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

If you have an array stored in column-major order and wish to d@0: transform it using FFTW, it is quite easy to do. When creating the d@0: plan, simply pass the dimensions of the array to the planner in d@0: reverse order. For example, if your array is a rank three d@0: N x M x L matrix in column-major order, you should pass the d@0: dimensions of the array as if it were an L x M x N matrix d@0: (which it is, from the perspective of FFTW). This is done for you d@0: automatically by the FFTW Fortran interface d@0: (see Calling FFTW from Fortran). d@0: d@0: d@0: d@0: d@0: