Mercurial > hg > batch-feature-extraction-tool
diff Lib/fftw-3.2.1/doc/html/.svn/text-base/Usage-of-Multi_002dthreaded-FFTW.html.svn-base @ 15:585caf503ef5 tip
Tidy up for ROLI
author | Geogaddi\David <d.m.ronan@qmul.ac.uk> |
---|---|
date | Tue, 17 May 2016 18:50:19 +0100 |
parents | 636c989477e7 |
children |
line wrap: on
line diff
--- a/Lib/fftw-3.2.1/doc/html/.svn/text-base/Usage-of-Multi_002dthreaded-FFTW.html.svn-base Wed May 04 11:02:59 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -<html lang="en"> -<head> -<title>Usage of Multi-threaded FFTW - FFTW 3.2.1</title> -<meta http-equiv="Content-Type" content="text/html"> -<meta name="description" content="FFTW 3.2.1"> -<meta name="generator" content="makeinfo 4.8"> -<link title="Top" rel="start" href="index.html#Top"> -<link rel="up" href="Multi_002dthreaded-FFTW.html#Multi_002dthreaded-FFTW" title="Multi-threaded FFTW"> -<link rel="prev" href="Installation-and-Supported-Hardware_002fSoftware.html#Installation-and-Supported-Hardware_002fSoftware" title="Installation and Supported Hardware/Software"> -<link rel="next" href="How-Many-Threads-to-Use_003f.html#How-Many-Threads-to-Use_003f" title="How Many Threads to Use?"> -<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> -<!-- -This manual is for FFTW -(version 3.2.1, 5 February 2009). - -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"> -<p> -<a name="Usage-of-Multi-threaded-FFTW"></a> -<a name="Usage-of-Multi_002dthreaded-FFTW"></a> -Next: <a rel="next" accesskey="n" href="How-Many-Threads-to-Use_003f.html#How-Many-Threads-to-Use_003f">How Many Threads to Use?</a>, -Previous: <a rel="previous" accesskey="p" href="Installation-and-Supported-Hardware_002fSoftware.html#Installation-and-Supported-Hardware_002fSoftware">Installation and Supported Hardware/Software</a>, -Up: <a rel="up" accesskey="u" href="Multi_002dthreaded-FFTW.html#Multi_002dthreaded-FFTW">Multi-threaded FFTW</a> -<hr> -</div> - -<h3 class="section">5.2 Usage of Multi-threaded FFTW</h3> - -<p>Here, it is assumed that the reader is already familiar with the usage -of the uniprocessor FFTW routines, described elsewhere in this manual. -We only describe what one has to change in order to use the -multi-threaded routines. - - <p>First, programs using the parallel complex transforms should be linked with -<code>-lfftw3_threads -lfftw3 -lm</code> on Unix. You will also need to link -with whatever library is responsible for threads on your system -(e.g. <code>-lpthread</code> on GNU/Linux). -<a name="index-linking-on-Unix-321"></a> -Second, before calling <em>any</em> FFTW routines, you should call the -function: - -<pre class="example"> int fftw_init_threads(void); -</pre> - <p><a name="index-fftw_005finit_005fthreads-322"></a> -This function, which need only be called once, performs any one-time -initialization required to use threads on your system. It returns zero -if there was some error (which should not happen under normal -circumstances) and a non-zero value otherwise. - - <p>Third, before creating a plan that you want to parallelize, you should -call: - -<pre class="example"> void fftw_plan_with_nthreads(int nthreads); -</pre> - <p><a name="index-fftw_005fplan_005fwith_005fnthreads-323"></a> -The <code>nthreads</code> argument indicates the number of threads you want -FFTW to use (or actually, the maximum number). All plans subsequently -created with any planner routine will use that many threads. You can -call <code>fftw_plan_with_nthreads</code>, create some plans, call -<code>fftw_plan_with_nthreads</code> again with a different argument, and -create some more plans for a new number of threads. Plans already created -before a call to <code>fftw_plan_with_nthreads</code> are unaffected. If you -pass an <code>nthreads</code> argument of <code>1</code> (the default), threads are -disabled for subsequent plans. - - <p>Given a plan, you then execute it as usual with -<code>fftw_execute(plan)</code>, and the execution will use the number of -threads specified when the plan was created. When done, you destroy it -as usual with <code>fftw_destroy_plan</code>. - - <p>There is one additional routine: if you want to get rid of all memory -and other resources allocated internally by FFTW, you can call: - -<pre class="example"> void fftw_cleanup_threads(void); -</pre> - <p><a name="index-fftw_005fcleanup_005fthreads-324"></a> -which is much like the <code>fftw_cleanup()</code> function except that it -also gets rid of threads-related data. You must <em>not</em> execute any -previously created plans after calling this function. - - <p>We should also mention one other restriction: if you save wisdom from a -program using the multi-threaded FFTW, that wisdom <em>cannot be used</em> -by a program using only the single-threaded FFTW (i.e. not calling -<code>fftw_init_threads</code>). See <a href="Words-of-Wisdom_002dSaving-Plans.html#Words-of-Wisdom_002dSaving-Plans">Words of Wisdom-Saving Plans</a>. - -<!-- --> -</body></html> -