Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: FFTW 3.3.5: Extended and quadruple precision in Fortran Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42:
Chris@42:

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

Chris@42:
Chris@42:
Chris@42: Chris@42:

7.1.1 Extended and quadruple precision in Fortran

Chris@42: Chris@42: Chris@42:

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

Chris@42:

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

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

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

Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: