annotate src/fftw-3.3.3/doc/html/Wisdom-of-Fortran_003f.html @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents 89f5e221ed7b
children
rev   line source
cannam@95 1 <html lang="en">
cannam@95 2 <head>
cannam@95 3 <title>Wisdom of Fortran? - FFTW 3.3.3</title>
cannam@95 4 <meta http-equiv="Content-Type" content="text/html">
cannam@95 5 <meta name="description" content="FFTW 3.3.3">
cannam@95 6 <meta name="generator" content="makeinfo 4.13">
cannam@95 7 <link title="Top" rel="start" href="index.html#Top">
cannam@95 8 <link rel="up" href="Calling-FFTW-from-Legacy-Fortran.html#Calling-FFTW-from-Legacy-Fortran" title="Calling FFTW from Legacy Fortran">
cannam@95 9 <link rel="prev" href="Fortran-Examples.html#Fortran-Examples" title="Fortran Examples">
cannam@95 10 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
cannam@95 11 <!--
cannam@95 12 This manual is for FFTW
cannam@95 13 (version 3.3.3, 25 November 2012).
cannam@95 14
cannam@95 15 Copyright (C) 2003 Matteo Frigo.
cannam@95 16
cannam@95 17 Copyright (C) 2003 Massachusetts Institute of Technology.
cannam@95 18
cannam@95 19 Permission is granted to make and distribute verbatim copies of
cannam@95 20 this manual provided the copyright notice and this permission
cannam@95 21 notice are preserved on all copies.
cannam@95 22
cannam@95 23 Permission is granted to copy and distribute modified versions of
cannam@95 24 this manual under the conditions for verbatim copying, provided
cannam@95 25 that the entire resulting derived work is distributed under the
cannam@95 26 terms of a permission notice identical to this one.
cannam@95 27
cannam@95 28 Permission is granted to copy and distribute translations of this
cannam@95 29 manual into another language, under the above conditions for
cannam@95 30 modified versions, except that this permission notice may be
cannam@95 31 stated in a translation approved by the Free Software Foundation.
cannam@95 32 -->
cannam@95 33 <meta http-equiv="Content-Style-Type" content="text/css">
cannam@95 34 <style type="text/css"><!--
cannam@95 35 pre.display { font-family:inherit }
cannam@95 36 pre.format { font-family:inherit }
cannam@95 37 pre.smalldisplay { font-family:inherit; font-size:smaller }
cannam@95 38 pre.smallformat { font-family:inherit; font-size:smaller }
cannam@95 39 pre.smallexample { font-size:smaller }
cannam@95 40 pre.smalllisp { font-size:smaller }
cannam@95 41 span.sc { font-variant:small-caps }
cannam@95 42 span.roman { font-family:serif; font-weight:normal; }
cannam@95 43 span.sansserif { font-family:sans-serif; font-weight:normal; }
cannam@95 44 --></style>
cannam@95 45 </head>
cannam@95 46 <body>
cannam@95 47 <div class="node">
cannam@95 48 <a name="Wisdom-of-Fortran%3f"></a>
cannam@95 49 <a name="Wisdom-of-Fortran_003f"></a>
cannam@95 50 <p>
cannam@95 51 Previous:&nbsp;<a rel="previous" accesskey="p" href="Fortran-Examples.html#Fortran-Examples">Fortran Examples</a>,
cannam@95 52 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>
cannam@95 53 <hr>
cannam@95 54 </div>
cannam@95 55
cannam@95 56 <h3 class="section">8.5 Wisdom of Fortran?</h3>
cannam@95 57
cannam@95 58 <p>In this section, we discuss how one can import/export FFTW wisdom
cannam@95 59 (saved plans) to/from a Fortran program; we assume that the reader is
cannam@95 60 already familiar with wisdom, as described in <a href="Words-of-Wisdom_002dSaving-Plans.html#Words-of-Wisdom_002dSaving-Plans">Words of Wisdom-Saving Plans</a>.
cannam@95 61
cannam@95 62 <p><a name="index-portability-598"></a>The basic problem is that is difficult to (portably) pass files and
cannam@95 63 strings between Fortran and C, so we cannot provide a direct Fortran
cannam@95 64 equivalent to the <code>fftw_export_wisdom_to_file</code>, etcetera,
cannam@95 65 functions. Fortran interfaces <em>are</em> provided for the functions
cannam@95 66 that do not take file/string arguments, however:
cannam@95 67 <code>dfftw_import_system_wisdom</code>, <code>dfftw_import_wisdom</code>,
cannam@95 68 <code>dfftw_export_wisdom</code>, and <code>dfftw_forget_wisdom</code>.
cannam@95 69 <a name="index-dfftw_005fimport_005fsystem_005fwisdom-599"></a><a name="index-dfftw_005fimport_005fwisdom-600"></a><a name="index-dfftw_005fexport_005fwisdom-601"></a><a name="index-dfftw_005fforget_005fwisdom-602"></a>
cannam@95 70
cannam@95 71 <p>So, for example, to import the system-wide wisdom, you would do:
cannam@95 72
cannam@95 73 <pre class="example"> integer isuccess
cannam@95 74 call dfftw_import_system_wisdom(isuccess)
cannam@95 75 </pre>
cannam@95 76 <p>As usual, the C return value is turned into a first parameter;
cannam@95 77 <code>isuccess</code> is non-zero on success and zero on failure (e.g. if
cannam@95 78 there is no system wisdom installed).
cannam@95 79
cannam@95 80 <p>If you want to import/export wisdom from/to an arbitrary file or
cannam@95 81 elsewhere, you can employ the generic <code>dfftw_import_wisdom</code> and
cannam@95 82 <code>dfftw_export_wisdom</code> functions, for which you must supply a
cannam@95 83 subroutine to read/write one character at a time. The FFTW package
cannam@95 84 contains an example file <code>doc/f77_wisdom.f</code> demonstrating how to
cannam@95 85 implement <code>import_wisdom_from_file</code> and
cannam@95 86 <code>export_wisdom_to_file</code> subroutines in this way. (These routines
cannam@95 87 cannot be compiled into the FFTW library itself, lest all FFTW-using
cannam@95 88 programs be required to link with the Fortran I/O library.)
cannam@95 89
cannam@95 90 </body></html>
cannam@95 91