Gromacs  2025-dev-20240614-602a366
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Attributes
gmx_fft_mkl Struct Reference


Contents of the Intel MKL FFT fft datatype.

Note that this is one of several possible implementations of gmx_fft_t.

The MKL API supports 1D,2D, and 3D transforms, including real-to-complex. Unfortunately the actual library implementation does not support 3D real transforms as of version 7.2, and versions before 7.0 don't support 2D real either. In addition, the multi-dimensional storage format for real data is not compatible with our padding.

To work around this we roll our own 2D and 3D real-to-complex transforms, using separate X/Y/Z handles defined to perform (ny*nz), (nx*nz), and (nx*ny) transforms at once when necessary. To perform strided multiple transforms out-of-place (i.e., without padding in the last dimension) on the fly we also need to separate the forward and backward handles for real-to-complex/complex-to-real data permutation.

This makes it necessary to define 3 handles for in-place FFTs, and 4 for the out-of-place transforms. Still, whenever possible we try to use a single 3D-transform handle instead.

So, the handles are enumerated as follows:

1D FFT (real too): Index 0 is the handle for the entire FFT 2D complex FFT: Index 0 is the handle for the entire FFT 3D complex FFT: Index 0 is the handle for the entire FFT 2D, inplace real FFT: 0=FFTx, 1=FFTy handle 2D, ooplace real FFT: 0=FFTx, 1=real-to-complex FFTy, 2=complex-to-real FFTy 3D, inplace real FFT: 0=FFTx, 1=FFTy, 2=FFTz handle 3D, ooplace real FFT: 0=FFTx, 1=FFTy, 2=r2c FFTz, 3=c2r FFTz

Intel people reading this: Learn from FFTW what a good interface looks like :-)

Public Attributes

int ndim
 Number of dimensions in FFT.
int nx
 Length of X transform.
int ny
 Length of Y transform.
int real_fft
 1 if real FFT, otherwise 0
DFTI_DESCRIPTOR * inplace [3]
 in-place FFT
DFTI_DESCRIPTOR * ooplace [4]
 out-of-place FFT
t_complex * work
 Enable out-of-place c2r FFT.

The documentation for this struct was generated from the following file: