Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: FFTW 3.3.8: Extended and quadruple precision in Fortran Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82:
Chris@82:

Chris@82: Previous: , Up: Overview of Fortran interface   [Contents][Index]

Chris@82:
Chris@82:
Chris@82: Chris@82:

7.1.1 Extended and quadruple precision in Fortran

Chris@82: Chris@82: Chris@82:

If FFTW is compiled in long double (extended) precision Chris@82: (see Installation and Customization), you may be able to call the Chris@82: resulting fftwl_ routines (see Precision) from Fortran if Chris@82: your compiler supports the C_LONG_DOUBLE_COMPLEX type code. Chris@82:

Chris@82:

Because some Fortran compilers do not support Chris@82: C_LONG_DOUBLE_COMPLEX, the fftwl_ declarations are Chris@82: segregated into a separate interface file fftw3l.f03, which you Chris@82: should include in addition to fftw3.f03 (which declares Chris@82: precision-independent ‘FFTW_’ constants): Chris@82:

Chris@82: Chris@82:
Chris@82:
  use, intrinsic :: iso_c_binding 
Chris@82:   include 'fftw3.f03'
Chris@82:   include 'fftw3l.f03'
Chris@82: 
Chris@82: Chris@82:

We also support using the nonstandard __float128 Chris@82: quadruple-precision type provided by recent versions of gcc on Chris@82: 32- and 64-bit x86 hardware (see Installation and Customization), Chris@82: using the corresponding real(16) and complex(16) types Chris@82: supported by gfortran. The quadruple-precision ‘fftwq_’ Chris@82: functions (see Precision) are declared in a fftw3q.f03 Chris@82: interface file, which should be included in addition to Chris@82: fftw3l.f03, as above. You should also link with Chris@82: -lfftw3q -lquadmath -lm as in C. Chris@82:

Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: