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