[ English | Japanese ]
FFTW3 Interface (For C)
Introduction
FFTW3 interface is a library whose interface is mostly compatible with that of FFTW version 3.x (a part of functions and constants are not supported). Just by replacing the header file provided by FFTW to ASL's one, user programs using FFTW can employ ASL's Fourier transform functions highly optimized for Vector Engine. The original FFTW is an open-source Fourier transform library available at the FFTW Official site[1]. Refer to the FFTW documentation[2] for details.
How to use FFTW3 interface
Header File Name Substitution
The file name of the header file of the FFTW3 interface is different from that of the header file provided by the original FFTW. When you use the FFTW3 interface, please substitute the name of the header file as follows:
#include <fftw3.h> ⇒ #include <aslfftw3.h>
Complex Number Type Selection
The complex number types in FFTW3 Interface are defined as follows:
Double Precision | Single Precision | |
---|---|---|
C++ | complex<double> |
complex<float> |
C99 | double _Complex |
float _Complex |
Original FFTW | double[2] |
float[2] |
When you want to use the complex number types as defined in the original FFTW,
add the compile option -DASLFFTW_COMPLEX_LEGACY
.
Compiling and Linking
Compiling and Linking describes how to compile and link with the FFTW3 interface library.
Thread Safety
Since ASL FFTW3 Interface internally uses ASL Unified Interface, the thread safety of ASL FFTW3 Interface is based on that of ASL Unified Interface. (Please see here for the thread safety of ASL Unified Interface.)
- The functions of ASL FFTW3 Interface are not thread-safe when linking the sequential version and the distributed-memory parallel version, i.e. the MPI version, of ASL libraries. You must ensure that any other threads do not call the library while a certain thread is creating or destroying a plan. With this requirement, two or more threads can call the library simultaneously only if different plans are used in respective threads.
When you would like to call the functions in a parallel region, please do both 1. and 2.:- Please create and destroy plans used in the respective threads outside of the parallel region. In the parallel region, please ensure that a different plan is used in each thread corresponding to the thread number that omp_get_thread_num() returns.
- Please link the sequential version or the distributed-memory parallel version of ASL library. (Please see here for how to link the library.)
- The functions of ASL FFTW3 Interface are partially thread-safe and already multithreaded internally when linking the shared-memory parallel version and the hybrid parallel version, i.e. the shared-memory + MPI version, of ASL libraries. Two or more threads can create and destroy plans simultaneously.
- NEC Numeric Library Collection version 2.3.0 or later
A plan can be shared among threads. However, it is strongly recommended to use plans outside of multithreaded parts, ex. parallel regions, in your program because the FFT execution functions are already multithreaded internally. - NEC Numeric Library Collection version 2.2.0 or earlier
Please do not share the same plan among threads. It is strongly recommended to use plans outside of multithreaded parts, ex. parallel regions, in your program because the FFT execution functions are already multithreaded internally.
- NEC Numeric Library Collection version 2.3.0 or later
The source code of the FFTW3 interface
The source code of the FFTW3 interface is stored in the following compressed file:
/opt/nec/ve/nlc/X.X.X/src/aslfftw3-Y.Y.tar.gz (X.X.X is the version number of NEC Numeric Library Collection) (Y.Y is the version number of FFTW3 interface)
You can freely use it under the BSD license.
Available functions
Available functions are listed on FFTW3 interface functions.
Remarks |
---|
|
FFTW3 interface functions
Plan Creation
Sequential / Shared Memory Parallel | Distributed Memory Parallel |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Plan Execution
Sequential / Shared Memory Parallel | Distributed Memory Parallel |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Plan Destruction
|
Utility Functions (common)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utility Functions (sequential / shared memory parallel)
|
Utility Functions (distributed memory parallel)
|
|
|
|
|
|
|
|
|
|
Example Programs
External Links
Version Information
- The API version this manual page targets: 1.3
- This manual page version: 2.2.0-201225