Chris@19: Chris@19:
Chris@19:Chris@19: Previous: Overview of Fortran interface, Chris@19: Up: Overview of Fortran interface Chris@19:
Chris@19: If FFTW is compiled in long double
(extended) precision
Chris@19: (see Installation and Customization), you may be able to call the
Chris@19: resulting fftwl_
routines (see Precision) from Fortran if
Chris@19: your compiler supports the C_LONG_DOUBLE_COMPLEX
type code.
Chris@19:
Chris@19:
Because some Fortran compilers do not support
Chris@19: C_LONG_DOUBLE_COMPLEX
, the fftwl_
declarations are
Chris@19: segregated into a separate interface file fftw3l.f03
, which you
Chris@19: should include in addition to fftw3.f03
(which declares
Chris@19: precision-independent ‘FFTW_’ constants):
Chris@19:
Chris@19:
use, intrinsic :: iso_c_binding Chris@19: include 'fftw3.f03' Chris@19: include 'fftw3l.f03' Chris@19:Chris@19:
We also support using the nonstandard __float128
Chris@19: quadruple-precision type provided by recent versions of gcc
on
Chris@19: 32- and 64-bit x86 hardware (see Installation and Customization),
Chris@19: using the corresponding real(16)
and complex(16)
types
Chris@19: supported by gfortran
. The quadruple-precision ‘fftwq_’
Chris@19: functions (see Precision) are declared in a fftw3q.f03
Chris@19: interface file, which should be included in addition to
Chris@19: fftw3l.f03
, as above. You should also link with
Chris@19: -lfftw3q -lquadmath -lm
as in C.
Chris@19:
Chris@19:
Chris@19:
Chris@19: