Department of Computer Science, UNC Chapel Hill

GPUFFTW: High Performance Power-of-Two FFT Library using Graphics Processors

Contents of the Distribution

The archive contains all the libraries and include files needed to build applications using GPUFFTW. The only assumption made about the target system is the presence of a working OpenGL runtime with the correct drivers for the video card and the presence of GLUT. In case you are not sure about the video drivers on your system and own an NVIDIA card, go here to install the latest drivers for your system. The following is a description of what each folder contains:

  1. src: Source code for the GPUFFTW library
  2. include: Include files for applications using GPUFFTW
  3. Samples: One example demonstrating usage of the GPUFFTW library
  4. Project files: Project files for Microsoft Visual Studio 6.0, Microsoft Visual Studio .NET 2003 and higher, and makefiles for linux
  5. lib: Contains the GPUFFTW library for Win32 and linux

Building an application

Setting up the library for use in your application is simple.

  1. Build the gpufftw library
  2. Make sure you link to glut32.lib and gpufftw.lib (or libgpufftw.a on linux)
  3. The include folder included with the distribution should be in your include path
  4. Once the above two things have been done, all you need to do is #include <GPUFFTW.h> in your application

GPUFFTW API

Since the API of GPUFFTW is very simple and similar to Intel Math Kernel Library, instead of a function-by-function description of the class, we will present details to illustrate the usage.

The function cgpufft1d is designed for complex 1D FFTs. The function requires the real data in one array, the corresponding imaginary data array, and a sign. The sign is used to determine forward or backward FFT.

The function scgpufft1d is designed for real 1D FFTs. It accepts an input real array, and a sign. The sign is used to determine forward or backward FFT. This code implicitly converts the real FFT problem into complex FFTs of half-size and the code is adapted from numerical recipes in C.

 

 

©2003 Department of Computer Science, UNC Chapel Hill