Previous: , Up: Guru Interface   [Contents][Index]


4.5.6 64-bit Guru Interface

When compiled in 64-bit mode on a 64-bit architecture (where addresses are 64 bits wide), FFTW uses 64-bit quantities internally for all transform sizes, strides, and so on—you don’t have to do anything special to exploit this. However, in the ordinary FFTW interfaces, you specify the transform size by an int quantity, which is normally only 32 bits wide. This means that, even though FFTW is using 64-bit sizes internally, you cannot specify a single transform dimension larger than 231−1numbers.

We expect that few users will require transforms larger than this, but, for those who do, we provide a 64-bit version of the guru interface in which all sizes are specified as integers of type ptrdiff_t instead of int. (ptrdiff_t is a signed integer type defined by the C standard to be wide enough to represent address differences, and thus must be at least 64 bits wide on a 64-bit machine.) We stress that there is no performance advantage to using this interface—the same internal FFTW code is employed regardless—and it is only necessary if you want to specify very large transform sizes.

In particular, the 64-bit guru interface is a set of planner routines that are exactly the same as the guru planner routines, except that they are named with ‘guru64’ instead of ‘guru’ and they take arguments of type fftw_iodim64 instead of fftw_iodim. For example, instead of fftw_plan_guru_dft, we have fftw_plan_guru64_dft.

fftw_plan fftw_plan_guru64_dft(
     int rank, const fftw_iodim64 *dims,
     int howmany_rank, const fftw_iodim64 *howmany_dims,
     fftw_complex *in, fftw_complex *out,
     int sign, unsigned flags);

The fftw_iodim64 type is similar to fftw_iodim, with the same interpretation, except that it uses type ptrdiff_t instead of type int.

typedef struct {
     ptrdiff_t n;
     ptrdiff_t is;
     ptrdiff_t os;
} fftw_iodim64;

Every other ‘fftw_plan_guru’ function also has a ‘fftw_plan_guru64’ equivalent, but we do not repeat their documentation here since they are identical to the 32-bit versions except as noted above.


Previous: , Up: Guru Interface   [Contents][Index]