Chris@10: Chris@10: Chris@10: Column-major Format - FFTW 3.3.3 Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10:
Chris@10: Chris@10: Chris@10:

Chris@10: Next: , Chris@10: Previous: Row-major Format, Chris@10: Up: Multi-dimensional Array Format Chris@10:


Chris@10:
Chris@10: Chris@10:

3.2.2 Column-major Format

Chris@10: Chris@10:

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

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