Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.3/doc/html/MPI-Data-Distribution-Functions.html @ 95:89f5e221ed7b
Add FFTW3
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Wed, 20 Mar 2013 15:35:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
94:d278df1123f9 | 95:89f5e221ed7b |
---|---|
1 <html lang="en"> | |
2 <head> | |
3 <title>MPI Data Distribution Functions - 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="FFTW-MPI-Reference.html#FFTW-MPI-Reference" title="FFTW MPI Reference"> | |
9 <link rel="prev" href="Using-MPI-Plans.html#Using-MPI-Plans" title="Using MPI Plans"> | |
10 <link rel="next" href="MPI-Plan-Creation.html#MPI-Plan-Creation" title="MPI Plan Creation"> | |
11 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> | |
12 <!-- | |
13 This manual is for FFTW | |
14 (version 3.3.3, 25 November 2012). | |
15 | |
16 Copyright (C) 2003 Matteo Frigo. | |
17 | |
18 Copyright (C) 2003 Massachusetts Institute of Technology. | |
19 | |
20 Permission is granted to make and distribute verbatim copies of | |
21 this manual provided the copyright notice and this permission | |
22 notice are preserved on all copies. | |
23 | |
24 Permission is granted to copy and distribute modified versions of | |
25 this manual under the conditions for verbatim copying, provided | |
26 that the entire resulting derived work is distributed under the | |
27 terms of a permission notice identical to this one. | |
28 | |
29 Permission is granted to copy and distribute translations of this | |
30 manual into another language, under the above conditions for | |
31 modified versions, except that this permission notice may be | |
32 stated in a translation approved by the Free Software Foundation. | |
33 --> | |
34 <meta http-equiv="Content-Style-Type" content="text/css"> | |
35 <style type="text/css"><!-- | |
36 pre.display { font-family:inherit } | |
37 pre.format { font-family:inherit } | |
38 pre.smalldisplay { font-family:inherit; font-size:smaller } | |
39 pre.smallformat { font-family:inherit; font-size:smaller } | |
40 pre.smallexample { font-size:smaller } | |
41 pre.smalllisp { font-size:smaller } | |
42 span.sc { font-variant:small-caps } | |
43 span.roman { font-family:serif; font-weight:normal; } | |
44 span.sansserif { font-family:sans-serif; font-weight:normal; } | |
45 --></style> | |
46 </head> | |
47 <body> | |
48 <div class="node"> | |
49 <a name="MPI-Data-Distribution-Functions"></a> | |
50 <p> | |
51 Next: <a rel="next" accesskey="n" href="MPI-Plan-Creation.html#MPI-Plan-Creation">MPI Plan Creation</a>, | |
52 Previous: <a rel="previous" accesskey="p" href="Using-MPI-Plans.html#Using-MPI-Plans">Using MPI Plans</a>, | |
53 Up: <a rel="up" accesskey="u" href="FFTW-MPI-Reference.html#FFTW-MPI-Reference">FFTW MPI Reference</a> | |
54 <hr> | |
55 </div> | |
56 | |
57 <h4 class="subsection">6.12.4 MPI Data Distribution Functions</h4> | |
58 | |
59 <p><a name="index-data-distribution-447"></a>As described above (see <a href="MPI-Data-Distribution.html#MPI-Data-Distribution">MPI Data Distribution</a>), in order to | |
60 allocate your arrays, <em>before</em> creating a plan, you must first | |
61 call one of the following routines to determine the required | |
62 allocation size and the portion of the array locally stored on a given | |
63 process. The <code>MPI_Comm</code> communicator passed here must be | |
64 equivalent to the communicator used below for plan creation. | |
65 | |
66 <p>The basic interface for multidimensional transforms consists of the | |
67 functions: | |
68 | |
69 <p><a name="index-fftw_005fmpi_005flocal_005fsize_005f2d-448"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005f3d-449"></a><a name="index-fftw_005fmpi_005flocal_005fsize-450"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005f2d_005ftransposed-451"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005f3d_005ftransposed-452"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005ftransposed-453"></a> | |
70 <pre class="example"> ptrdiff_t fftw_mpi_local_size_2d(ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm, | |
71 ptrdiff_t *local_n0, ptrdiff_t *local_0_start); | |
72 ptrdiff_t fftw_mpi_local_size_3d(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2, | |
73 MPI_Comm comm, | |
74 ptrdiff_t *local_n0, ptrdiff_t *local_0_start); | |
75 ptrdiff_t fftw_mpi_local_size(int rnk, const ptrdiff_t *n, MPI_Comm comm, | |
76 ptrdiff_t *local_n0, ptrdiff_t *local_0_start); | |
77 | |
78 ptrdiff_t fftw_mpi_local_size_2d_transposed(ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm, | |
79 ptrdiff_t *local_n0, ptrdiff_t *local_0_start, | |
80 ptrdiff_t *local_n1, ptrdiff_t *local_1_start); | |
81 ptrdiff_t fftw_mpi_local_size_3d_transposed(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t n2, | |
82 MPI_Comm comm, | |
83 ptrdiff_t *local_n0, ptrdiff_t *local_0_start, | |
84 ptrdiff_t *local_n1, ptrdiff_t *local_1_start); | |
85 ptrdiff_t fftw_mpi_local_size_transposed(int rnk, const ptrdiff_t *n, MPI_Comm comm, | |
86 ptrdiff_t *local_n0, ptrdiff_t *local_0_start, | |
87 ptrdiff_t *local_n1, ptrdiff_t *local_1_start); | |
88 </pre> | |
89 <p>These functions return the number of elements to allocate (complex | |
90 numbers for DFT/r2c/c2r plans, real numbers for r2r plans), whereas | |
91 the <code>local_n0</code> and <code>local_0_start</code> return the portion | |
92 (<code>local_0_start</code> to <code>local_0_start + local_n0 - 1</code>) of the | |
93 first dimension of an n<sub>0</sub> × n<sub>1</sub> × n<sub>2</sub> × … × n<sub>d-1</sub> array that is stored on the local | |
94 process. See <a href="Basic-and-advanced-distribution-interfaces.html#Basic-and-advanced-distribution-interfaces">Basic and advanced distribution interfaces</a>. For | |
95 <code>FFTW_MPI_TRANSPOSED_OUT</code> plans, the ‘<samp><span class="samp">_transposed</span></samp>’ variants | |
96 are useful in order to also return the local portion of the first | |
97 dimension in the n<sub>1</sub> × n<sub>0</sub> × n<sub>2</sub> ×…× n<sub>d-1</sub> transposed output. See <a href="Transposed-distributions.html#Transposed-distributions">Transposed distributions</a>. The advanced interface for multidimensional | |
98 transforms is: | |
99 | |
100 <p><a name="index-advanced-interface-454"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005fmany-455"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005fmany_005ftransposed-456"></a> | |
101 <pre class="example"> ptrdiff_t fftw_mpi_local_size_many(int rnk, const ptrdiff_t *n, ptrdiff_t howmany, | |
102 ptrdiff_t block0, MPI_Comm comm, | |
103 ptrdiff_t *local_n0, ptrdiff_t *local_0_start); | |
104 ptrdiff_t fftw_mpi_local_size_many_transposed(int rnk, const ptrdiff_t *n, ptrdiff_t howmany, | |
105 ptrdiff_t block0, ptrdiff_t block1, MPI_Comm comm, | |
106 ptrdiff_t *local_n0, ptrdiff_t *local_0_start, | |
107 ptrdiff_t *local_n1, ptrdiff_t *local_1_start); | |
108 </pre> | |
109 <p>These differ from the basic interface in only two ways. First, they | |
110 allow you to specify block sizes <code>block0</code> and <code>block1</code> (the | |
111 latter for the transposed output); you can pass | |
112 <code>FFTW_MPI_DEFAULT_BLOCK</code> to use FFTW's default block size as in | |
113 the basic interface. Second, you can pass a <code>howmany</code> parameter, | |
114 corresponding to the advanced planning interface below: this is for | |
115 transforms of contiguous <code>howmany</code>-tuples of numbers | |
116 (<code>howmany = 1</code> in the basic interface). | |
117 | |
118 <p>The corresponding basic and advanced routines for one-dimensional | |
119 transforms (currently only complex DFTs) are: | |
120 | |
121 <p><a name="index-fftw_005fmpi_005flocal_005fsize_005f1d-457"></a><a name="index-fftw_005fmpi_005flocal_005fsize_005fmany_005f1d-458"></a> | |
122 <pre class="example"> ptrdiff_t fftw_mpi_local_size_1d( | |
123 ptrdiff_t n0, MPI_Comm comm, int sign, unsigned flags, | |
124 ptrdiff_t *local_ni, ptrdiff_t *local_i_start, | |
125 ptrdiff_t *local_no, ptrdiff_t *local_o_start); | |
126 ptrdiff_t fftw_mpi_local_size_many_1d( | |
127 ptrdiff_t n0, ptrdiff_t howmany, | |
128 MPI_Comm comm, int sign, unsigned flags, | |
129 ptrdiff_t *local_ni, ptrdiff_t *local_i_start, | |
130 ptrdiff_t *local_no, ptrdiff_t *local_o_start); | |
131 </pre> | |
132 <p><a name="index-FFTW_005fMPI_005fSCRAMBLED_005fOUT-459"></a><a name="index-FFTW_005fMPI_005fSCRAMBLED_005fIN-460"></a>As above, the return value is the number of elements to allocate | |
133 (complex numbers, for complex DFTs). The <code>local_ni</code> and | |
134 <code>local_i_start</code> arguments return the portion | |
135 (<code>local_i_start</code> to <code>local_i_start + local_ni - 1</code>) of the | |
136 1d array that is stored on this process for the transform | |
137 <em>input</em>, and <code>local_no</code> and <code>local_o_start</code> are the | |
138 corresponding quantities for the input. The <code>sign</code> | |
139 (<code>FFTW_FORWARD</code> or <code>FFTW_BACKWARD</code>) and <code>flags</code> must | |
140 match the arguments passed when creating a plan. Although the inputs | |
141 and outputs have different data distributions in general, it is | |
142 guaranteed that the <em>output</em> data distribution of an | |
143 <code>FFTW_FORWARD</code> plan will match the <em>input</em> data distribution | |
144 of an <code>FFTW_BACKWARD</code> plan and vice versa; similarly for the | |
145 <code>FFTW_MPI_SCRAMBLED_OUT</code> and <code>FFTW_MPI_SCRAMBLED_IN</code> flags. | |
146 See <a href="One_002ddimensional-distributions.html#One_002ddimensional-distributions">One-dimensional distributions</a>. | |
147 | |
148 </body></html> | |
149 |