cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: FFTW 3.3.5: Column-major Format cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127:
cannam@127:

cannam@127: Next: , Previous: , Up: Multi-dimensional Array Format   [Contents][Index]

cannam@127:
cannam@127:
cannam@127: cannam@127:

3.2.2 Column-major Format

cannam@127: cannam@127: cannam@127:

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

cannam@127:

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

cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: