diff src/fftw-3.3.3/doc/html/Other-Multi_002ddimensional-Real_002ddata-MPI-Transforms.html @ 95:89f5e221ed7b

Add FFTW3
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/fftw-3.3.3/doc/html/Other-Multi_002ddimensional-Real_002ddata-MPI-Transforms.html	Wed Mar 20 15:35:50 2013 +0000
@@ -0,0 +1,104 @@
+<html lang="en">
+<head>
+<title>Other Multi-dimensional Real-data MPI Transforms - FFTW 3.3.3</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="FFTW 3.3.3">
+<meta name="generator" content="makeinfo 4.13">
+<link title="Top" rel="start" href="index.html#Top">
+<link rel="up" href="Distributed_002dmemory-FFTW-with-MPI.html#Distributed_002dmemory-FFTW-with-MPI" title="Distributed-memory FFTW with MPI">
+<link rel="prev" href="Multi_002ddimensional-MPI-DFTs-of-Real-Data.html#Multi_002ddimensional-MPI-DFTs-of-Real-Data" title="Multi-dimensional MPI DFTs of Real Data">
+<link rel="next" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes" title="FFTW MPI Transposes">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<!--
+This manual is for FFTW
+(version 3.3.3, 25 November 2012).
+
+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">
+<a name="Other-Multi-dimensional-Real-data-MPI-Transforms"></a>
+<a name="Other-Multi_002ddimensional-Real_002ddata-MPI-Transforms"></a>
+<p>
+Next:&nbsp;<a rel="next" accesskey="n" href="FFTW-MPI-Transposes.html#FFTW-MPI-Transposes">FFTW MPI Transposes</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="Multi_002ddimensional-MPI-DFTs-of-Real-Data.html#Multi_002ddimensional-MPI-DFTs-of-Real-Data">Multi-dimensional MPI DFTs of Real Data</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="Distributed_002dmemory-FFTW-with-MPI.html#Distributed_002dmemory-FFTW-with-MPI">Distributed-memory FFTW with MPI</a>
+<hr>
+</div>
+
+<h3 class="section">6.6 Other multi-dimensional Real-Data MPI Transforms</h3>
+
+<p><a name="index-r2r-393"></a>FFTW's MPI interface also supports multi-dimensional &lsquo;<samp><span class="samp">r2r</span></samp>&rsquo;
+transforms of all kinds supported by the serial interface
+(e.g. discrete cosine and sine transforms, discrete Hartley
+transforms, etc.).  Only multi-dimensional &lsquo;<samp><span class="samp">r2r</span></samp>&rsquo; transforms, not
+one-dimensional transforms, are currently parallelized.
+
+   <p><a name="index-fftw_005fr2r_005fkind-394"></a>These are used much like the multidimensional complex DFTs discussed
+above, except that the data is real rather than complex, and one needs
+to pass an r2r transform kind (<code>fftw_r2r_kind</code>) for each
+dimension as in the serial FFTW (see <a href="More-DFTs-of-Real-Data.html#More-DFTs-of-Real-Data">More DFTs of Real Data</a>).
+
+   <p>For example, one might perform a two-dimensional L&nbsp;&times;&nbsp;M that is
+an REDFT10 (DCT-II) in the first dimension and an RODFT10 (DST-II) in
+the second dimension with code like:
+
+<pre class="example">         const ptrdiff_t L = ..., M = ...;
+         fftw_plan plan;
+         double *data;
+         ptrdiff_t alloc_local, local_n0, local_0_start, i, j;
+     
+         /* <span class="roman">get local data size and allocate</span> */
+         alloc_local = fftw_mpi_local_size_2d(L, M, MPI_COMM_WORLD,
+                                              &amp;local_n0, &amp;local_0_start);
+         data = fftw_alloc_real(alloc_local);
+     
+         /* <span class="roman">create plan for in-place REDFT10 x RODFT10</span> */
+         plan = fftw_mpi_plan_r2r_2d(L, M, data, data, MPI_COMM_WORLD,
+                                     FFTW_REDFT10, FFTW_RODFT10, FFTW_MEASURE);
+     
+         /* <span class="roman">initialize data to some function</span> my_function(x,y) */
+         for (i = 0; i &lt; local_n0; ++i) for (j = 0; j &lt; M; ++j)
+            data[i*M + j] = my_function(local_0_start + i, j);
+     
+         /* <span class="roman">compute transforms, in-place, as many times as desired</span> */
+         fftw_execute(plan);
+     
+         fftw_destroy_plan(plan);
+</pre>
+   <p><a name="index-fftw_005falloc_005freal-395"></a>Notice that we use the same &lsquo;<samp><span class="samp">local_size</span></samp>&rsquo; functions as we did for
+complex data, only now we interpret the sizes in terms of real rather
+than complex values, and correspondingly use <code>fftw_alloc_real</code>.
+
+<!--  -->
+   </body></html>
+