view src/fftw-3.3.3/doc/html/FFTW-Constants-in-Fortran.html @ 10:37bf6b4a2645

Add FFTW3
author Chris Cannam
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
line wrap: on
line source
<html lang="en">
<head>
<title>FFTW Constants in Fortran - FFTW 3.3.3</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="FFTW 3.3.3">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Calling-FFTW-from-Legacy-Fortran.html#Calling-FFTW-from-Legacy-Fortran" title="Calling FFTW from Legacy Fortran">
<link rel="prev" href="Fortran_002dinterface-routines.html#Fortran_002dinterface-routines" title="Fortran-interface routines">
<link rel="next" href="FFTW-Execution-in-Fortran.html#FFTW-Execution-in-Fortran" title="FFTW Execution in Fortran">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual is for FFTW
(version 3.3.3, 25 November 2012).

Copyright (C) 2003 Matteo Frigo.

Copyright (C) 2003 Massachusetts Institute of Technology.

     Permission is granted to make and distribute verbatim copies of
     this manual provided the copyright notice and this permission
     notice are preserved on all copies.

     Permission is granted to copy and distribute modified versions of
     this manual under the conditions for verbatim copying, provided
     that the entire resulting derived work is distributed under the
     terms of a permission notice identical to this one.

     Permission is granted to copy and distribute translations of this
     manual into another language, under the above conditions for
     modified versions, except that this permission notice may be
     stated in a translation approved by the Free Software Foundation.
   -->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="FFTW-Constants-in-Fortran"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="FFTW-Execution-in-Fortran.html#FFTW-Execution-in-Fortran">FFTW Execution in Fortran</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Fortran_002dinterface-routines.html#Fortran_002dinterface-routines">Fortran-interface routines</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Calling-FFTW-from-Legacy-Fortran.html#Calling-FFTW-from-Legacy-Fortran">Calling FFTW from Legacy Fortran</a>
<hr>
</div>

<h3 class="section">8.2 FFTW Constants in Fortran</h3>

<p>When creating plans in FFTW, a number of constants are used to specify
options, such as <code>FFTW_MEASURE</code> or <code>FFTW_ESTIMATE</code>.  The
same constants must be used with the wrapper routines, but of course the
C header files where the constants are defined can't be incorporated
directly into Fortran code.

   <p>Instead, we have placed Fortran equivalents of the FFTW constant
definitions in the file <code>fftw3.f</code>, which can be found in the same
directory as <code>fftw3.h</code>.  If your Fortran compiler supports a
preprocessor of some sort, you should be able to <code>include</code> or
<code>#include</code> this file; otherwise, you can paste it directly into
your code.

   <p><a name="index-flags-583"></a>In C, you combine different flags (like <code>FFTW_PRESERVE_INPUT</code> and
<code>FFTW_MEASURE</code>) using the &lsquo;<samp><code>|</code></samp>&rsquo; operator; in Fortran
you should just use &lsquo;<samp><code>+</code></samp>&rsquo;.  (Take care not to add in the
same flag more than once, though.  Alternatively, you can use the
<code>ior</code> intrinsic function standardized in Fortran 95.)

<!--  -->
   </body></html>