annotate fft/fftw/fftw-3.3.4/doc/html/MPI-Data-Distribution-Functions.html @ 40:223f770b5341 kissfft-double tip

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