comparison src/fftw-3.3.5/doc/html/Wisdom-Import.html @ 42:2cd0e3b3e1fd

Current fftw source
author Chris Cannam
date Tue, 18 Oct 2016 13:40:26 +0100
parents
children
comparison
equal deleted inserted replaced
41:481f5f8c5634 42:2cd0e3b3e1fd
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- This manual is for FFTW
4 (version 3.3.5, 30 July 2016).
5
6 Copyright (C) 2003 Matteo Frigo.
7
8 Copyright (C) 2003 Massachusetts Institute of Technology.
9
10 Permission is granted to make and distribute verbatim copies of this
11 manual provided the copyright notice and this permission notice are
12 preserved on all copies.
13
14 Permission is granted to copy and distribute modified versions of this
15 manual under the conditions for verbatim copying, provided that the
16 entire resulting derived work is distributed under the terms of a
17 permission notice identical to this one.
18
19 Permission is granted to copy and distribute translations of this manual
20 into another language, under the above conditions for modified versions,
21 except that this permission notice may be stated in a translation
22 approved by the Free Software Foundation. -->
23 <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
24 <head>
25 <title>FFTW 3.3.5: Wisdom Import</title>
26
27 <meta name="description" content="FFTW 3.3.5: Wisdom Import">
28 <meta name="keywords" content="FFTW 3.3.5: Wisdom Import">
29 <meta name="resource-type" content="document">
30 <meta name="distribution" content="global">
31 <meta name="Generator" content="makeinfo">
32 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
33 <link href="index.html#Top" rel="start" title="Top">
34 <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
35 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
36 <link href="Wisdom.html#Wisdom" rel="up" title="Wisdom">
37 <link href="Forgetting-Wisdom.html#Forgetting-Wisdom" rel="next" title="Forgetting Wisdom">
38 <link href="Wisdom-Export.html#Wisdom-Export" rel="prev" title="Wisdom Export">
39 <style type="text/css">
40 <!--
41 a.summary-letter {text-decoration: none}
42 blockquote.smallquotation {font-size: smaller}
43 div.display {margin-left: 3.2em}
44 div.example {margin-left: 3.2em}
45 div.indentedblock {margin-left: 3.2em}
46 div.lisp {margin-left: 3.2em}
47 div.smalldisplay {margin-left: 3.2em}
48 div.smallexample {margin-left: 3.2em}
49 div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
50 div.smalllisp {margin-left: 3.2em}
51 kbd {font-style:oblique}
52 pre.display {font-family: inherit}
53 pre.format {font-family: inherit}
54 pre.menu-comment {font-family: serif}
55 pre.menu-preformatted {font-family: serif}
56 pre.smalldisplay {font-family: inherit; font-size: smaller}
57 pre.smallexample {font-size: smaller}
58 pre.smallformat {font-family: inherit; font-size: smaller}
59 pre.smalllisp {font-size: smaller}
60 span.nocodebreak {white-space:nowrap}
61 span.nolinebreak {white-space:nowrap}
62 span.roman {font-family:serif; font-weight:normal}
63 span.sansserif {font-family:sans-serif; font-weight:normal}
64 ul.no-bullet {list-style: none}
65 -->
66 </style>
67
68
69 </head>
70
71 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
72 <a name="Wisdom-Import"></a>
73 <div class="header">
74 <p>
75 Next: <a href="Forgetting-Wisdom.html#Forgetting-Wisdom" accesskey="n" rel="next">Forgetting Wisdom</a>, Previous: <a href="Wisdom-Export.html#Wisdom-Export" accesskey="p" rel="prev">Wisdom Export</a>, Up: <a href="Wisdom.html#Wisdom" accesskey="u" rel="up">Wisdom</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
76 </div>
77 <hr>
78 <a name="Wisdom-Import-1"></a>
79 <h4 class="subsection">4.7.2 Wisdom Import</h4>
80
81 <div class="example">
82 <pre class="example">int fftw_import_system_wisdom(void);
83 int fftw_import_wisdom_from_filename(const char *filename);
84 int fftw_import_wisdom_from_string(const char *input_string);
85 int fftw_import_wisdom(int (*read_char)(void *), void *data);
86 </pre></div>
87 <a name="index-fftw_005fimport_005fwisdom"></a>
88 <a name="index-fftw_005fimport_005fsystem_005fwisdom-1"></a>
89 <a name="index-fftw_005fimport_005fwisdom_005ffrom_005ffilename-1"></a>
90 <a name="index-fftw_005fimport_005fwisdom_005ffrom_005ffile"></a>
91 <a name="index-fftw_005fimport_005fwisdom_005ffrom_005fstring"></a>
92
93 <p>These functions import wisdom into a program from data stored by the
94 <code>fftw_export_wisdom</code> functions above. (See <a href="Words-of-Wisdom_002dSaving-Plans.html#Words-of-Wisdom_002dSaving-Plans">Words of Wisdom-Saving Plans</a>.) The imported wisdom replaces any wisdom
95 already accumulated by the running program.
96 </p>
97 <p><code>fftw_import_wisdom</code> imports wisdom from any input medium, as
98 specified by the callback function <code>read_char</code>. <code>read_char</code> is
99 a <code>getc</code>-like function that returns the next character in the
100 input; its parameter is the <code>data</code> pointer passed to
101 <code>fftw_import_wisdom</code>. If the end of the input data is reached
102 (which should never happen for valid data), <code>read_char</code> should
103 return <code>EOF</code> (as defined in <code>&lt;stdio.h&gt;</code>). For convenience,
104 the following three &ldquo;wrapper&rdquo; routines are provided:
105 </p>
106 <p><code>fftw_import_wisdom_from_filename</code> reads wisdom from a file named
107 <code>filename</code>. A lower-level function, which requires you to open
108 and close the file yourself (e.g. if you want to read wisdom from a
109 portion of a larger file) is <code>fftw_import_wisdom_from_file</code>. This
110 reads wisdom from the current position in <code>input_file</code> (which
111 should be open with read permission); upon exit, the file remains
112 open, but the position of the read pointer is unspecified.
113 </p>
114 <p><code>fftw_import_wisdom_from_string</code> reads wisdom from the
115 <code>NULL</code>-terminated string <code>input_string</code>.
116 </p>
117 <p><code>fftw_import_system_wisdom</code> reads wisdom from an
118 implementation-defined standard file (<code>/etc/fftw/wisdom</code> on Unix
119 and GNU systems).
120 <a name="index-wisdom_002c-system_002dwide-1"></a>
121 </p>
122
123 <p>The return value of these import routines is <code>1</code> if the wisdom was
124 read successfully and <code>0</code> otherwise. Note that, in all of these
125 functions, any data in the input stream past the end of the wisdom data
126 is simply ignored.
127 </p>
128 <hr>
129 <div class="header">
130 <p>
131 Next: <a href="Forgetting-Wisdom.html#Forgetting-Wisdom" accesskey="n" rel="next">Forgetting Wisdom</a>, Previous: <a href="Wisdom-Export.html#Wisdom-Export" accesskey="p" rel="prev">Wisdom Export</a>, Up: <a href="Wisdom.html#Wisdom" accesskey="u" rel="up">Wisdom</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
132 </div>
133
134
135
136 </body>
137 </html>