comparison src/fftw-3.3.3/doc/html/One_002ddimensional-distributions.html @ 10:37bf6b4a2645

Add FFTW3
author Chris Cannam
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
comparison
equal deleted inserted replaced
9:c0fb53affa76 10:37bf6b4a2645
1 <html lang="en">
2 <head>
3 <title>One-dimensional distributions - FFTW 3.3.3</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="FFTW 3.3.3">
6 <meta name="generator" content="makeinfo 4.13">
7 <link title="Top" rel="start" href="index.html#Top">
8 <link rel="up" href="MPI-Data-Distribution.html#MPI-Data-Distribution" title="MPI Data Distribution">
9 <link rel="prev" href="Transposed-distributions.html#Transposed-distributions" title="Transposed distributions">
10 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
11 <!--
12 This manual is for FFTW
13 (version 3.3.3, 25 November 2012).
14
15 Copyright (C) 2003 Matteo Frigo.
16
17 Copyright (C) 2003 Massachusetts Institute of Technology.
18
19 Permission is granted to make and distribute verbatim copies of
20 this manual provided the copyright notice and this permission
21 notice are preserved on all copies.
22
23 Permission is granted to copy and distribute modified versions of
24 this manual under the conditions for verbatim copying, provided
25 that the entire resulting derived work is distributed under the
26 terms of a permission notice identical to this one.
27
28 Permission is granted to copy and distribute translations of this
29 manual into another language, under the above conditions for
30 modified versions, except that this permission notice may be
31 stated in a translation approved by the Free Software Foundation.
32 -->
33 <meta http-equiv="Content-Style-Type" content="text/css">
34 <style type="text/css"><!--
35 pre.display { font-family:inherit }
36 pre.format { font-family:inherit }
37 pre.smalldisplay { font-family:inherit; font-size:smaller }
38 pre.smallformat { font-family:inherit; font-size:smaller }
39 pre.smallexample { font-size:smaller }
40 pre.smalllisp { font-size:smaller }
41 span.sc { font-variant:small-caps }
42 span.roman { font-family:serif; font-weight:normal; }
43 span.sansserif { font-family:sans-serif; font-weight:normal; }
44 --></style>
45 </head>
46 <body>
47 <div class="node">
48 <a name="One-dimensional-distributions"></a>
49 <a name="One_002ddimensional-distributions"></a>
50 <p>
51 Previous:&nbsp;<a rel="previous" accesskey="p" href="Transposed-distributions.html#Transposed-distributions">Transposed distributions</a>,
52 Up:&nbsp;<a rel="up" accesskey="u" href="MPI-Data-Distribution.html#MPI-Data-Distribution">MPI Data Distribution</a>
53 <hr>
54 </div>
55
56 <h4 class="subsection">6.4.4 One-dimensional distributions</h4>
57
58 <p>For one-dimensional distributed DFTs using FFTW, matters are slightly
59 more complicated because the data distribution is more closely tied to
60 how the algorithm works. In particular, you can no longer pass an
61 arbitrary block size and must accept FFTW's default; also, the block
62 sizes may be different for input and output. Also, the data
63 distribution depends on the flags and transform direction, in order
64 for forward and backward transforms to work correctly.
65
66 <pre class="example"> ptrdiff_t fftw_mpi_local_size_1d(ptrdiff_t n0, MPI_Comm comm,
67 int sign, unsigned flags,
68 ptrdiff_t *local_ni, ptrdiff_t *local_i_start,
69 ptrdiff_t *local_no, ptrdiff_t *local_o_start);
70 </pre>
71 <p><a name="index-fftw_005fmpi_005flocal_005fsize_005f1d-383"></a>
72 This function computes the data distribution for a 1d transform of
73 size <code>n0</code> with the given transform <code>sign</code> and <code>flags</code>.
74 Both input and output data use block distributions. The input on the
75 current process will consist of <code>local_ni</code> numbers starting at
76 index <code>local_i_start</code>; e.g. if only a single process is used,
77 then <code>local_ni</code> will be <code>n0</code> and <code>local_i_start</code> will
78 be <code>0</code>. Similarly for the output, with <code>local_no</code> numbers
79 starting at index <code>local_o_start</code>. The return value of
80 <code>fftw_mpi_local_size_1d</code> will be the total number of elements to
81 allocate on the current process (which might be slightly larger than
82 the local size due to intermediate steps in the algorithm).
83
84 <p>As mentioned above (see <a href="Load-balancing.html#Load-balancing">Load balancing</a>), the data will be divided
85 equally among the processes if <code>n0</code> is divisible by the
86 <em>square</em> of the number of processes. In this case,
87 <code>local_ni</code> will equal <code>local_no</code>. Otherwise, they may be
88 different.
89
90 <p>For some applications, such as convolutions, the order of the output
91 data is irrelevant. In this case, performance can be improved by
92 specifying that the output data be stored in an FFTW-defined
93 &ldquo;scrambled&rdquo; format. (In particular, this is the analogue of
94 transposed output in the multidimensional case: scrambled output saves
95 a communications step.) If you pass <code>FFTW_MPI_SCRAMBLED_OUT</code> in
96 the flags, then the output is stored in this (undocumented) scrambled
97 order. Conversely, to perform the inverse transform of data in
98 scrambled order, pass the <code>FFTW_MPI_SCRAMBLED_IN</code> flag.
99 <a name="index-FFTW_005fMPI_005fSCRAMBLED_005fOUT-384"></a><a name="index-FFTW_005fMPI_005fSCRAMBLED_005fIN-385"></a>
100
101 <p>In MPI FFTW, only composite sizes <code>n0</code> can be parallelized; we
102 have not yet implemented a parallel algorithm for large prime sizes.
103
104 <!-- -->
105 </body></html>
106