Introduction to fftw
FFTW is a C subroutine library for computing the discrete Fourier
transform (DFT) in one or more dimensions, of arbitrary input size,
and of both real and complex data (as well as of even/odd data,
i.e. the discrete cosine/sine transforms or DCT/DST).
This package is known to build and work properly using an LFS 12.2
platform.
Package Information
-
Download (HTTP): https://www.fftw.org/fftw-3.3.10.tar.gz
-
Download MD5 sum: 8ccbf6a5ea78a16dbc3e1306e234cc5c
-
Download size: 4.0 MB
-
Estimated disk space required: 59 MB
-
Estimated build time: 1.6 SBU (add 3.4 SBU for tests, both
using parallelism=4)
Installation of fftw
Note
We build fftw three times for different libraries in different
numerical precisions: the default double precision floating
point, the older 32-bit (single precision) version named float
which sacrifices precision for speed, and the long double which
offers increased precision at the cost of slower execution.
The first build is for double precision arithmetic. Install
fftw by running the following
commands:
./configure --prefix=/usr \
--enable-shared \
--disable-static \
--enable-threads \
--enable-sse2 \
--enable-avx \
--enable-avx2 &&
make
To test the results, issue: make
check. On 32-bit systems, the tests can take
substantially longer than they would on 64-bit machines.
Now, as the root
user:
make install
Now build single precision:
make clean &&
./configure --prefix=/usr \
--enable-shared \
--disable-static \
--enable-threads \
--enable-sse2 \
--enable-avx \
--enable-avx2 \
--enable-float &&
make
As the root
user:
make install
Finally, build long double precision:
make clean &&
./configure --prefix=/usr \
--enable-shared \
--disable-static \
--enable-threads \
--enable-long-double &&
make
As the root
user:
make install
Command Explanations
--enable-shared
--disable-static
: Use shared libs
instead of static libs.
--enable-threads
: This
enables libfftw3_threads.so
to be
compiled. It is used by e.g. the gimp plugin from G'MIC.
--enable-{sse2,avx,avx2}
:
These enables building the optimized routines using SSE2, AVX, and
AVX2 instructions. FFTW will check if these routines can be really
used on the current CPU when the FFTW library is loaded, so a FFTW
build with these routines enabled can still run on a CPU without
SSE2, AVX, or AVX2. These options are not compatible with
--enable-long-double
.
--enable-float
: This
enables building the library that uses single precision floating
point arithmetic. It is faster but less precise than the default
double precision library. The library will be called libfftw3f.so
needed by PulseAudio-17.0.
--enable-long-double
: This
enables building the library that uses higher precision long-double
floating point arithmetic. The library will be called libfftw3l.so
.
--enable-avx512
: This enables building
the optimized routines using AVX512F instructions. FFTW will check
if these routines can be really used on the current CPU when the
FFTW library is loaded, so a FFTW build with these routines enabled
can still run on a CPU without AVX512F. Use this option if the FFTW
build will be used on a CPU with AVX512F. This option is not
compatible with --enable-long-double
.
Contents
Installed Programs:
fftw-wisdom and
fftw-wisdom-to-conf
Installed Libraries:
libfftw3.so, libfftw3_threads.so,
libfftw3f.so, libfftw3f_threads.so, libfftw3l.so and
libfftw3l_threads.so
Installed Directories:
None
Short Descriptions
fftw-wisdom
|
is a utility to generate FFTW wisdom files, which contain
saved information about how to optimally compute
(Fourier) transforms of various sizes
|
fftw-wisdom-to-conf
|
is a utility to generate C configuration routines from
FFTW wisdom files, where the latter contain saved
information about how to optimally compute (Fourier)
transforms of various sizes
|
libfftw3.so
|
is the Fast Fourier Transform library
|
libfftw3_threads.so
|
is the threaded Fast Fourier Transform library
|
libfftw3f.so
|
is the single-precision Fast Fourier Transform library,
described as “float” for historic reasons
|
libfftw3f_threads.so
|
is the threaded single-precision Fast Fourier Transform
library
|
libfftw3l.so
|
is the long double Fast Fourier Transform library
|
libfftw3l_threads.so
|
is the threaded long double Fast Fourier Transform
library
|