| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.1.2 Precision
You can install single and long-double precision versions of FFTW,
which replace double with float and long double,
respectively (see section Installation and Customization). To use these
interfaces, you:
-
Link to the single/long-double libraries; on Unix,
-lfftw3for-lfftw3linstead of (or in addition to)-lfftw3. (You can link to the different-precision libraries simultaneously.) -
Include the same
<fftw3.h>header file. -
Replace all lowercase instances of ‘fftw_’ with ‘fftwf_’ or
fftwl_for single or long-double precision, respectively. (fftw_complexbecomesfftwf_complex,fftw_executebecomesfftwf_execute, etcetera.) - Uppercase names, i.e. names beginning with ‘FFTW_’, remain the same.
-
Replace
doublewithfloatorlong doublefor subroutine parameters.
Depending upon your compiler and/or hardware, long double may not
be any more precise than double (or may not be supported at all,
although it is standard in C99).
We also support using the nonstandard __float128
quadruple-precision type provided by recent versions of gcc on
32- and 64-bit x86 hardware (see section Installation and Customization).
To use this type, link with -lfftw3q -lquadmath -lm (the
libquadmath library provided by gcc is needed for
quadruple-precision trigonometric functions) and use ‘fftwq_’
identifiers.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 3, 2012 using texi2html 5.0.
