FFTW++ provides a simple interface for 1D, 2D, and 3D complex-to-complex, real-to-complex, and complex-to-real Fast Fourier Transforms that takes care of the technical aspects of memory allocation, alignment, planning, and wisdom. Wrappers for multiple 1D transforms are also provided. As with the FFTW3 library, in-place and out-of-place multithreaded transforms of arbitrary size are supported.
Implicit dealiasing of standard and centered Hermitian convolutions is also implemented; in 2D and 3D this implicit zero-padding substantially reduces memory usage and computation time. See Efficient Dealiased Convolutions without Padding by John C. Bowman and Malcolm Roberts, SIAM Journal on Scientific Computing, 33:1, 386-406 (2011):
Convenient optional shift routines that place the Fourier origin in the logical center of the domain are provided for centered complex-to-real transforms in 2D and 3D; see fftw++.h for details.
FFTW++ can also exploit the high-performance Array class (version 1.47 or higher), designed for scientific computing. The arrays in that package do memory bounds checking in debugging mode, but can be optimized by specifying the -DNDEBUG compilation option (1D arrays optimize completely to pointer operations).
FFTW++ includes interfaces and examples for calling FFTW++ from C++, C, Python, and Fortran.
Detailed documentation is provided before each class in the fftw++.h header file. The included examples illustrate how easy it is to use FFTW in C++ with the FFTW++ header class. Use of the Array class is optional, but encouraged. If for some reason the Array class is not used, memory should be allocated with ComplexAlign (or doubleAlign) to ensure that the data is optimally aligned to sizeof(Complex), to enable the SIMD extensions. The optional alignment check in fftw++.h can be disabled with the -DNO_CHECK_ALIGN compiler option.
Examples using ComplexAlign allocator:
Examples using Array class:
Implicitly dealiased convolutions:
1D and 2D implicitly dealiased convolutions
1D complex convolution test
1D Hermitian convolution test
1D Hermitian ternary convolution test
2D complex convolution test
2D Hermitian convolution test
2D Hermitian ternary convolution test
3D complex convolution test
3D Hermitian convolution test
All source files in the FFTW++ project, unless explicitly noted otherwise, are released under version 3 (or later) of the GNU Lesser General Public License (see the files LICENSE.LESSER and LICENSE in the top-level source directory).