annotate src/fftw-3.3.3/doc/html/Basic-distributed_002dtranspose-interface.html @ 95:89f5e221ed7b

Add FFTW3
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
rev   line source
cannam@95 1 <html lang="en">
cannam@95 2 <head>
cannam@95 3 <title>Basic distributed-transpose interface - FFTW 3.3.3</title>
cannam@95 4 <meta http-equiv="Content-Type" content="text/html">
cannam@95 5 <meta name="description" content="FFTW 3.3.3">
cannam@95 6 <meta name="generator" content="makeinfo 4.13">
cannam@95 7 <link title="Top" rel="start" href="index.html#Top">
cannam@95 8 <link rel="up" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes" title="FFTW MPI Transposes">
cannam@95 9 <link rel="prev" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes" title="FFTW MPI Transposes">
cannam@95 10 <link rel="next" href="Advanced-distributed_002dtranspose-interface.html#Advanced-distributed_002dtranspose-interface" title="Advanced distributed-transpose interface">
cannam@95 11 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
cannam@95 12 <!--
cannam@95 13 This manual is for FFTW
cannam@95 14 (version 3.3.3, 25 November 2012).
cannam@95 15
cannam@95 16 Copyright (C) 2003 Matteo Frigo.
cannam@95 17
cannam@95 18 Copyright (C) 2003 Massachusetts Institute of Technology.
cannam@95 19
cannam@95 20 Permission is granted to make and distribute verbatim copies of
cannam@95 21 this manual provided the copyright notice and this permission
cannam@95 22 notice are preserved on all copies.
cannam@95 23
cannam@95 24 Permission is granted to copy and distribute modified versions of
cannam@95 25 this manual under the conditions for verbatim copying, provided
cannam@95 26 that the entire resulting derived work is distributed under the
cannam@95 27 terms of a permission notice identical to this one.
cannam@95 28
cannam@95 29 Permission is granted to copy and distribute translations of this
cannam@95 30 manual into another language, under the above conditions for
cannam@95 31 modified versions, except that this permission notice may be
cannam@95 32 stated in a translation approved by the Free Software Foundation.
cannam@95 33 -->
cannam@95 34 <meta http-equiv="Content-Style-Type" content="text/css">
cannam@95 35 <style type="text/css"><!--
cannam@95 36 pre.display { font-family:inherit }
cannam@95 37 pre.format { font-family:inherit }
cannam@95 38 pre.smalldisplay { font-family:inherit; font-size:smaller }
cannam@95 39 pre.smallformat { font-family:inherit; font-size:smaller }
cannam@95 40 pre.smallexample { font-size:smaller }
cannam@95 41 pre.smalllisp { font-size:smaller }
cannam@95 42 span.sc { font-variant:small-caps }
cannam@95 43 span.roman { font-family:serif; font-weight:normal; }
cannam@95 44 span.sansserif { font-family:sans-serif; font-weight:normal; }
cannam@95 45 --></style>
cannam@95 46 </head>
cannam@95 47 <body>
cannam@95 48 <div class="node">
cannam@95 49 <a name="Basic-distributed-transpose-interface"></a>
cannam@95 50 <a name="Basic-distributed_002dtranspose-interface"></a>
cannam@95 51 <p>
cannam@95 52 Next:&nbsp;<a rel="next" accesskey="n" href="Advanced-distributed_002dtranspose-interface.html#Advanced-distributed_002dtranspose-interface">Advanced distributed-transpose interface</a>,
cannam@95 53 Previous:&nbsp;<a rel="previous" accesskey="p" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes">FFTW MPI Transposes</a>,
cannam@95 54 Up:&nbsp;<a rel="up" accesskey="u" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes">FFTW MPI Transposes</a>
cannam@95 55 <hr>
cannam@95 56 </div>
cannam@95 57
cannam@95 58 <h4 class="subsection">6.7.1 Basic distributed-transpose interface</h4>
cannam@95 59
cannam@95 60 <p>In particular, suppose that we have an <code>n0</code> by <code>n1</code> array in
cannam@95 61 row-major order, block-distributed across the <code>n0</code> dimension. To
cannam@95 62 transpose this into an <code>n1</code> by <code>n0</code> array block-distributed
cannam@95 63 across the <code>n1</code> dimension, we would create a plan by calling the
cannam@95 64 following function:
cannam@95 65
cannam@95 66 <pre class="example"> fftw_plan fftw_mpi_plan_transpose(ptrdiff_t n0, ptrdiff_t n1,
cannam@95 67 double *in, double *out,
cannam@95 68 MPI_Comm comm, unsigned flags);
cannam@95 69 </pre>
cannam@95 70 <p><a name="index-fftw_005fmpi_005fplan_005ftranspose-397"></a>
cannam@95 71 The input and output arrays (<code>in</code> and <code>out</code>) can be the
cannam@95 72 same. The transpose is actually executed by calling
cannam@95 73 <code>fftw_execute</code> on the plan, as usual.
cannam@95 74 <a name="index-fftw_005fexecute-398"></a>
cannam@95 75
cannam@95 76 <p>The <code>flags</code> are the usual FFTW planner flags, but support
cannam@95 77 two additional flags: <code>FFTW_MPI_TRANSPOSED_OUT</code> and/or
cannam@95 78 <code>FFTW_MPI_TRANSPOSED_IN</code>. What these flags indicate, for
cannam@95 79 transpose plans, is that the output and/or input, respectively, are
cannam@95 80 <em>locally</em> transposed. That is, on each process input data is
cannam@95 81 normally stored as a <code>local_n0</code> by <code>n1</code> array in row-major
cannam@95 82 order, but for an <code>FFTW_MPI_TRANSPOSED_IN</code> plan the input data is
cannam@95 83 stored as <code>n1</code> by <code>local_n0</code> in row-major order. Similarly,
cannam@95 84 <code>FFTW_MPI_TRANSPOSED_OUT</code> means that the output is <code>n0</code> by
cannam@95 85 <code>local_n1</code> instead of <code>local_n1</code> by <code>n0</code>.
cannam@95 86 <a name="index-FFTW_005fMPI_005fTRANSPOSED_005fOUT-399"></a><a name="index-FFTW_005fMPI_005fTRANSPOSED_005fIN-400"></a>
cannam@95 87
cannam@95 88 <p>To determine the local size of the array on each process before and
cannam@95 89 after the transpose, as well as the amount of storage that must be
cannam@95 90 allocated, one should call <code>fftw_mpi_local_size_2d_transposed</code>,
cannam@95 91 just as for a 2d DFT as described in the previous section:
cannam@95 92 <a name="index-data-distribution-401"></a>
cannam@95 93 <pre class="example"> ptrdiff_t fftw_mpi_local_size_2d_transposed
cannam@95 94 (ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm,
cannam@95 95 ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
cannam@95 96 ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
cannam@95 97 </pre>
cannam@95 98 <p><a name="index-fftw_005fmpi_005flocal_005fsize_005f2d_005ftransposed-402"></a>
cannam@95 99 Again, the return value is the local storage to allocate, which in
cannam@95 100 this case is the number of <em>real</em> (<code>double</code>) values rather
cannam@95 101 than complex numbers as in the previous examples.
cannam@95 102
cannam@95 103 </body></html>
cannam@95 104