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