By Rezaur RahmanUse these simple and yet powerful APIs provided by the Intel® MKL to port FFTW 2.x and FFTW 3.x code easily to Intel MKL interfaces. Find out how.Fast Fourier Transforms (FFTs) are used heavily in the technical and image processing field to perform various types of computational tasks. Fastest Fourier Transform in the West (FFTW) is a collection of discrete Fourier transform routines available publicly. Intel has its own version of FFT code implemented as part of the Intel® Math Kernel Library (Intel® MKL). These are known as advanced Discreet Fourier Transform (DFT) routines and provide an interface referred to as DFTI in this document. These routines are optimized for Intel® architecture-based platforms (Intel® Itanium® processor-based platforms, platforms with Intel® Extended Memory 64 Technology (Intel® EM64T), and IA-32-based platforms). Software developers may gain considerable performance by using the Intel MKL for computing DFTs due to the optimizations built into these libraries. An additional benefit to using the Intel MKL is that independent software vendors (ISVs) may be able to take advantage of newer Intel architecture technologies without much effort.
This article introduces the readers to the APIs provided by the Intel MKL to invoke DFT code. Although the Intel MKL provides two sets of interfaces for DFT, we discourage you from using the older FFT interface. This document focuses on the latest DFT interfaces (referred to as DFTI) which are made with more flexibility and support more advanced features. In addition, we will look at how the DFTI interfaces relate to publicly available FFTW 2.x and FFTW3.x. We will not detail the interface definitions which are defined in the
Intel MKL Reference Manual provided with the library.
DFTI provides both the FORTRAN and C interfaces; we will deal with FORTRAN interfaces in this document. For C interfaces, there is a one-to-one correspondence and the same concepts apply. Fortran APIs need support of FORTRAN 95 as the API makes use of various modern constructs of FORTRAN 95.
It is assumed that you are familiar with the theory of DFT and related terms and properties. Brushing up on these terms will make this article more relevant. There is an abundance of literature on the subject.
In the DFT Equations section of this paper we shall briefly look at the mathematical formulation of a DFT. This will allow us to look at the parameters involved in defining a DFT operation. The DFTI Interfaces in the Intel MKL section will walk through the set of interfaces provided by DFTI that allows manipulation of the parameters involved in a DFT operation and the actual computations. Finally, the Mapping between FFTW and Intel MKL Interfaces section will relate the DFTI with the FFTW interfaces for those interested in porting their code from FFTW to DFTI.
Note: The relationship between the terms DFT and FFT should be clarified. These terms are often used interchangeably in this article. The term DFT indicates a mathematical operation known as Fourier Transform that is applied to a finite sequences of discrete values. FFT, on the other hand, represents an algorithm to perform the DFT in an optimized manner.