Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > b0aa6cd23b567cd0e312b072b2e3b0bf > files > 1180

nvidia-cuda-toolkit-devel-5.5.22-2.mga4.nonfree.x86_64.rpm

<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
      <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
      <meta name="copyright" content="(C) Copyright 2005"></meta>
      <meta name="DC.rights.owner" content="(C) Copyright 2005"></meta>
      <meta name="DC.Type" content="concept"></meta>
      <meta name="DC.Title" content="CUFFT"></meta>
      <meta name="abstract" content="The API reference guide for CUFFT, the CUDA Fast Fourier Transform library."></meta>
      <meta name="description" content="The API reference guide for CUFFT, the CUDA Fast Fourier Transform library."></meta>
      <meta name="DC.Coverage" content="CUDA API References"></meta>
      <meta name="DC.subject" content="CUDA CUFFT, CUDA CUFFT features, CUDA CUFFT data, CUDA CUFFT layout, CUDA CUFFT performance, CUDA CUFFT API, CUDA CUFFT library, CUDA CUFFT example, CUDA CUFFT transforms, CUDA CUFFT multidimensional transforms"></meta>
      <meta name="keywords" content="CUDA CUFFT, CUDA CUFFT features, CUDA CUFFT data, CUDA CUFFT layout, CUDA CUFFT performance, CUDA CUFFT API, CUDA CUFFT library, CUDA CUFFT example, CUDA CUFFT transforms, CUDA CUFFT multidimensional transforms"></meta>
      <meta name="DC.Format" content="XHTML"></meta>
      <meta name="DC.Identifier" content="abstract"></meta>
      <link rel="stylesheet" type="text/css" href="../common/formatting/commonltr.css"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/site.css"></link>
      <title>CUFFT :: CUDA Toolkit Documentation</title>
      <!--[if lt IE 9]>
      <script src="../common/formatting/html5shiv-printshiv.min.js"></script>
      <![endif]-->
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.min.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.ba-hashchange.min.js"></script>
      <link rel="canonical" href="http://docs.nvidia.com/cuda/cufft/index.html"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/qwcode.highlight.css"></link>
   </head>
   <body>
      
      <article id="contents">
         <div id="eqn-warning">This document includes math equations
            (highlighted in red) which are best viewed with <a target="_blank" href="https://www.mozilla.org/firefox">Firefox</a> version 4.0
            or higher, or another <a target="_blank" href="http://www.w3.org/Math/Software/mathml_software_cat_browsers.html">MathML-aware
               browser</a>. There is also a <a href="../../pdf/CUFFT_Library.pdf">PDF version of this
               document</a>.
            
         </div>
         <div id="eqn-warning-buf"></div>
         <div id="release-info">CUFFT
            (<a href="../../pdf/CUFFT_Library.pdf">PDF</a>)
            -
            CUDA Toolkit v5.5
            (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>)
            -
            Last updated 
            July 19, 2013
            -
            <a href="mailto:cudatools@nvidia.com?subject=CUDA Tools Documentation Feedback: cufft">Send Feedback</a></div>
         <div class="topic nested0" id="abstract"><a name="abstract" shape="rect">
               <!-- --></a><h2 class="title topictitle1"><a href="#abstract" name="abstract" shape="rect">CUFFT</a></h2>
            <div class="body conbody"></div>
         </div>
         <div class="topic concept nested0" xml:lang="en-us" id="introduction"><a name="introduction" shape="rect">
               <!-- --></a><h2 class="title topictitle1"><a href="#introduction" name="introduction" shape="rect">1.&nbsp;Introduction</a></h2>
            <div class="body conbody">
               <p class="p">This document describes CUFFT, the NVIDIA® CUDA™ Fast Fourier Transform (FFT) product. It consists of two separate libraries:
                  CUFFT and CUFFTW. The CUFFT library is designed to provide high performance on NVIDIA GPUs. The CUFFTW library is provided
                  as porting tool to enable users of FFTW to start using NVIDIA GPUs with a minimum amount of effort.
               </p>
               <p class="p">The FFT is a divide-and-conquer algorithm for efficiently computing discrete Fourier transforms of complex or real-valued
                  data sets. It is one of the most important and widely used numerical algorithms in computational physics and general signal
                  processing. The CUFFT library provides a simple interface for computing FFTs on an NVIDIA GPU, which allows users to quickly
                  leverage the floating-point power and parallelism of the GPU in a highly optimized and tested FFT library.
               </p>
               <p class="p">The CUFFT product supports a wide range of FFT inputs and options efficiently on NVIDIA GPUs. This version of the CUFFT library
                  supports the following features:
               </p>
               <ul class="ul">
                  <li class="li">Algorithms highly optimized for input sizes that can be written in the form 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <msup>
                           <mn>2</mn>
                           <mi>a</mi>
                        </msup>
                        <mo>×</mo>
                        <msup>
                           <mn>3</mn>
                           <mi>b</mi>
                        </msup>
                        <mo>×</mo>
                        <msup>
                           <mn>5</mn>
                           <mi>c</mi>
                        </msup>
                        <mo>×</mo>
                        <msup>
                           <mn>7</mn>
                           <mi>d</mi>
                        </msup>
                     </math>
                  </li>
                  <li class="li">An 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mrow>
                           <mi>O</mi>
                           <mrow>
                              <mo maxsize="1.00em">(</mo>
                              <mi>n</mi>
                              <mi>log</mi>
                              <mi>n</mi>
                              <mo maxsize="1.00em">)</mo>
                           </mrow>
                        </mrow>
                     </math> algorithm for every input data size
                  </li>
                  <li class="li">Complex and real-valued input and output:
                     
                     <ul class="ul">
                        <li class="li">C2C - Complex input to complex output</li>
                        <li class="li">R2C - Real input to complex output</li>
                        <li class="li">C2R - Symmetric complex input to real output</li>
                     </ul>
                  </li>
                  <li class="li">1D, 2D and 3D transforms</li>
                  <li class="li">Execution of multiple 1D, 2D and 3D transforms simultaneously</li>
                  <li class="li">Single-precision (32-bit floating point) and double-precision (64-bit floating point)</li>
                  <li class="li">In-place and out-of-place transforms</li>
                  <li class="li">FFTW compatible data layouts</li>
                  <li class="li">Arbitrary intra- and inter-dimension element strides (strided layout)</li>
                  <li class="li">Streamed execution, enabling asynchronous computation and data movement</li>
                  <li class="li">Transform sizes up to 128 million elements in single precision and up to 64 million elements in double precision in any dimension,
                     limited by the available GPU memory
                  </li>
                  <li class="li">Thread-safe API that can be called from multiple independent host threads</li>
               </ul>
               <p class="p">The CUFFTW library provides the FFTW3 API to facilitate porting of existing FFTW applications. </p>
            </div>
         </div>
         <div class="topic concept nested0" xml:lang="en-us" id="using-the-cufft-api"><a name="using-the-cufft-api" shape="rect">
               <!-- --></a><h2 class="title topictitle1"><a href="#using-the-cufft-api" name="using-the-cufft-api" shape="rect">2.&nbsp;Using the CUFFT API</a></h2>
            <div class="body conbody">
               <p class="p">This chapter provides a general overview of the CUFFT library API. For more complete information on specific functions, see
                  <a class="xref" href="index.html#cufft-api-reference" shape="rect">CUFFT API Reference</a>. Users are encouraged to read this chapter before continuing with more detailed descriptions.
               </p>
               <p class="p">The Discrete Fourier transform (DFT) maps a complex-valued vector 
                  <math xmlns="http://www.w3.org/1998/Math/MathML">
                     <mrow>
                        <msub>
                           <mi>x</mi>
                           <mi>k</mi>
                        </msub>
                     </mrow>
                  </math> (<dfn class="term">time domain</dfn>) into its <dfn class="term">frequency domain representation</dfn> given by:
               </p>
               <div class="tablenoborder"><a name="using-the-cufft-api__eq-1" shape="rect">
                     <!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="using-the-cufft-api__eq-1" class="table" frame="void" border="0" rules="none">
                     <tbody class="tbody">
                        <tr class="row">
                           <td class="entry" align="center" valign="top" width="100%" rowspan="1" colspan="1">
                              <p class="p d4p_eqn_block">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mi>X</mi>
                                       <mi>k</mi>
                                    </msub>
                                    <mo>=</mo>
                                    <munderover>
                                       <mo>∑</mo>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mi>n</mi>
                                          <mo>=</mo>
                                          <mn>0</mn>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mi>N</mi>
                                          <mo>−</mo>
                                          <mn>1</mn>
                                       </mrow>
                                    </munderover>
                                    <msub>
                                       <mi>x</mi>
                                       <mi>n</mi>
                                    </msub>
                                    <msup>
                                       <mi>e</mi>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>-2</mn>
                                          <mi>π</mi>
                                          <mi>i</mi>
                                          <mfrac>
                                             <mrow>
                                                <mi>k</mi>
                                                <mi>n</mi>
                                             </mrow>
                                             <mi>N</mi>
                                          </mfrac>
                                       </mrow>
                                    </msup>
                                 </math>
                              </p>
                           </td>
                        </tr>
                     </tbody>
                  </table>
               </div>
               <p class="p">where 
                  <math xmlns="http://www.w3.org/1998/Math/MathML">
                     <msub>
                        <mi>X</mi>
                        <mi>k</mi>
                     </msub>
                  </math> is a complex-valued vector of the same size. This is known as a <dfn class="term">forward</dfn> DFT. If the sign on the exponent of e is changed to be positive, the transform is an <dfn class="term">inverse</dfn> transform. Depending on 
                  <math xmlns="http://www.w3.org/1998/Math/MathML">
                     <mi>N</mi>
                  </math>, different algorithms are deployed for the best performance.
               </p>
               <p class="p">The CUFFT API is modeled after <a class="xref" href="http://www.fftw.org" target="_blank" shape="rect">FFTW</a>, which is one of the most popular and efficient CPU-based FFT libraries. CUFFT provides a simple configuration mechanism
                  called a <dfn class="term">plan</dfn> that pre-configures internal building blocks such that the execution time of the transform is as fast as possible for the
                  given configuration and the particular GPU hardware selected. Then, when the <dfn class="term">execution</dfn> function is called, the actual transform takes place following the plan of execution. The advantage of this approach is that
                  once the user creates a plan, the library retains whatever state is needed to execute the plan multiple times without recalculation
                  of the configuration. This model works well for CUFFT because different kinds of FFTs require different thread configurations
                  and GPU resources, and the plan interface provides a simple way of reusing configurations.
               </p>
               <p class="p">Computing a number <samp class="ph codeph">BATCH</samp> of one-dimensional DFTs of size <samp class="ph codeph">NX</samp> using CUFFT will typically look like this:
               </p><pre xml:space="preserve">
#define NX 256
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define BATCH 10</span>
...
{
    cufftHandle plan;
    cufftComplex *data;
    ...
    cudaMalloc((<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)&amp;data, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cufftComplex)*NX*BATCH);
    cufftPlan1d(&amp;plan, NX, CUFFT_C2C, BATCH);
    ...
    cufftExecC2C(plan, data, data, CUFFT_FORWARD);
    cudaThreadSynchronize();
    ...
    cufftDestroy(plan);
    cudaFree(data);
}

</pre></div>
            <div class="topic concept nested1" xml:lang="en-us" id="accessing-cufft"><a name="accessing-cufft" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#accessing-cufft" name="accessing-cufft" shape="rect">2.1.&nbsp;Accessing CUFFT</a></h3>
               <div class="body conbody">
                  <p class="p">The CUFFT and CUFFTW libraries are available as shared libraries. They consist of compiled programs ready for users to incorporate
                     into applications with the compiler and linker. CUFFT can be downloaded from <a class="xref" href="http://developer.nvidia.com/cufft" target="_blank" shape="rect">http://developer.nvidia.com/cufft</a>. By selecting <strong class="ph b">Download CUDA Production Release</strong> users are all able to install the package containing the CUDA Toolkit, SDK code samples and development drivers. The CUDA
                     Toolkit contains CUFFT and the samples include <samp class="ph codeph">simpleCUFFT</samp>.
                  </p>
                  <p class="p">The Linux release for <samp class="ph codeph">simpleCUFFT</samp> assumes that the root install directory is <samp class="ph codeph">/usr/local/cuda</samp> and that the locations of the products are contained there as follows. Modify the Makefile as appropriate for your system.
                  </p>
                  <div class="tablenoborder"><a name="accessing-cufft__table_2_5" shape="rect">
                        <!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="accessing-cufft__table_2_5" class="table" frame="border" border="1" rules="all">
                        <thead class="thead" align="left">
                           <tr class="row">
                              <th class="entry" valign="top" width="25%" id="d54e438" rowspan="1" colspan="1">Product</th>
                              <th class="entry" valign="top" width="37.5%" id="d54e441" rowspan="1" colspan="1">Location and name</th>
                              <th class="entry" valign="top" width="37.5%" id="d54e444" rowspan="1" colspan="1">Include file</th>
                           </tr>
                        </thead>
                        <tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="25%" headers="d54e438" rowspan="1" colspan="1"><samp class="ph codeph">nvcc</samp> compiler
                              </td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e441" rowspan="1" colspan="1"><samp class="ph codeph">/bin/nvcc</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e444" rowspan="1" colspan="1"></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="25%" headers="d54e438" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT</samp> library
                              </td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e441" rowspan="1" colspan="1"><samp class="ph codeph">{lib, lib64}/libcufft.so</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e444" rowspan="1" colspan="1"><samp class="ph codeph">inc/cufft.h</samp></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="25%" headers="d54e438" rowspan="1" colspan="1"><samp class="ph codeph">CUFFTW</samp> library
                              </td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e441" rowspan="1" colspan="1"><samp class="ph codeph">{lib, lib64}/libcufftw.so</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e444" rowspan="1" colspan="1"><samp class="ph codeph">inc/cufftw.h</samp></td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
                  <p class="p">The most common case is for developers to modify an existing CUDA routine (for example, <samp class="ph codeph">filename.cu</samp>) to call CUFFT routines. In this case the include file <samp class="ph codeph">cufft.h</samp> should be inserted into <samp class="ph codeph">filename.cu</samp> file and the library included in the link line. A single compile and link line might appear as 
                  </p>
                  <ul class="ul">
                     <li class="li"><samp class="ph codeph">/usr/local/cuda/bin/nvcc [options] filename.cu … -I/usr/local/cuda/inc -L/usr/local/cuda/lib -lcufft</samp></li>
                  </ul>
                  <p class="p">
                     Of course there will typically be many compile lines and the compiler <samp class="ph codeph">g++</samp> may be used for linking so long as the library path is set correctly.
                     
                  </p>
                  <p class="p">
                     Users of the FFTW interface (see <a class="xref" href="index.html#fftw-supported-interface" shape="rect">FFTW Interface to CUFFT</a>)
                     should include <samp class="ph codeph">cufftw.h</samp> and link with both CUFFT and CUFFTW libraries.
                     
                  </p>
                  <p class="p">
                     For the best performance input data should reside in device memory. Therefore programs in the CUFFT library assume that the
                     data is in GPU memory. For example, if one of the execution functions is called with data in host memory, the program will
                     return <samp class="ph codeph">CUFFT_EXEC_FAILED</samp>. Programs in the CUFFTW library assume that the input data is in host memory since this library is a porting tool for users
                     of FFTW. If the data resides in GPU memory, the program will abort.
                     
                  </p>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="cufft-setup"><a name="cufft-setup" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#cufft-setup" name="cufft-setup" shape="rect">2.2.&nbsp;Fourier Transform Setup</a></h3>
               <div class="body conbody">
                  <p class="p">The first step in using the CUFFT Library is to create a plan using one of the following:</p>
                  <ul class="ul">
                     <li class="li"><samp class="ph codeph">cufftPlan1D() / cufftPlan2D() / cufftPlan3D()</samp> - Create a simple plan for a 1D/2D/3D transform respectively.
                     </li>
                     <li class="li"><samp class="ph codeph">cufftPlanMany()</samp> - Creates a plan supporting batched input and strided data layouts.
                     </li>
                  </ul>
                  <p class="p">Among the plan creation functions, <samp class="ph codeph">cufftPlanMany()</samp> allows use of more complicated data layouts and batched executions. Execution of a transform of a particular size and type
                     may take several stages of processing. When a plan for the transform is generated, CUFFT derives the internal steps that need
                     to be taken. These steps may include multiple kernel launches, memory copies, and so on. In addition, all the intermediate
                     buffer allocations (on CPU/GPU memory) take place during planning. These buffers are released when the plan is destroyed.
                     In the worst case, the CUFFT Library allocates space for <samp class="ph codeph">8*batch*n[0]*..*n[rank-1] cufftComplex</samp> or <samp class="ph codeph">cufftDoubleComplex</samp> elements (where <samp class="ph codeph">batch</samp> denotes the number of transforms that will be executed in parallel, <samp class="ph codeph">rank</samp> is the number of dimensions of the input data (see <a class="xref" href="index.html#multi-dimensional" shape="rect">Multidimensional transforms</a>) and <samp class="ph codeph">n[]</samp> is the array of transform dimensions) for single and double-precision transforms respectively. Depending on the configuration
                     of the plan, less memory may be used. In some specific cases, the temporary space allocations can be as low as <samp class="ph codeph">1*batch*n[0]*..*n[rank-1] cufftComplex</samp> or <samp class="ph codeph">cufftDoubleComplex</samp> elements. This temporary space is allocated separately for each individual plan when it is created (i.e., temporary space
                     is not shared between the plans).
                  </p>
                  <p class="p">The next step in using the library is to call an execution function such as <samp class="ph codeph">cufftExecC2C()</samp> (see <a class="xref" href="index.html#cufft-transform-types" shape="rect">Parameter cufftType</a>) which will perform the transform with the specifications defined at planning.
                  </p>
                  <p class="p">One can create a CUFFT plan and perform multiple transforms on different data sets by providing different input and output
                     pointers. Once the plan is no longer needed, the <samp class="ph codeph">cufftDestroy()</samp> function should be called to release the resources allocated for the plan.
                  </p>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="fft-types"><a name="fft-types" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#fft-types" name="fft-types" shape="rect">2.3.&nbsp;Fourier Transform Types</a></h3>
               <div class="body conbody">
                  <p class="p">Apart from the general complex-to-complex (C2C) transform, CUFFT implements efficiently two other types: real-to-complex (R2C)
                     and complex-to-real (C2R). In many practical applications the input vector is real-valued. It can be easily shown that in
                     this case the output satisfies Hermitian symmetry (
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <msub>
                           <mi>X</mi>
                           <mi>k</mi>
                        </msub>
                        <mo>=</mo>
                        <msubsup>
                           <mi>X</mi>
                           <mrow class="MJX-TeXAtom-ORD">
                              <mi>N</mi>
                              <mo>−</mo>
                              <mi>k</mi>
                           </mrow>
                           <mo>∗</mo>
                        </msubsup>
                     </math>, where the star denotes complex conjugation). The converse is also true: for complex-Hermitian input the inverse transform
                     will be purely real-valued. CUFFT takes advantage of this redundancy and works only on the first half of the Hermitian vector.
                  </p>
                  <p class="p">Transform execution functions for single and double-precision are defined separately as:</p>
                  <ul class="ul">
                     <li class="li"><samp class="ph codeph">cufftExecC2C() / cufftExecZ2Z()</samp> - complex-to-complex transforms for single/double precision.
                     </li>
                     <li class="li"><samp class="ph codeph">cufftExecR2C() / cufftExecD2Z()</samp> - real-to-complex forward transform for single/double precision.
                     </li>
                     <li class="li"><samp class="ph codeph">cufftExecC2R() / cufftExecZ2D()</samp> - complex-to-real inverse transform for single/double precision.
                     </li>
                  </ul>
                  <p class="p">Each of those functions demands different input data layout (see <a class="xref" href="index.html#data-layout" shape="rect">Data Layout</a> for details).
                  </p>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="data-layout"><a name="data-layout" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#data-layout" name="data-layout" shape="rect">2.4.&nbsp;Data Layout</a></h3>
               <div class="body conbody">
                  <p class="p">In the CUFFT Library, data layout depends strictly on the configuration and the transform type. In the case of general complex-to-complex
                     transform both the input and output data shall be a <samp class="ph codeph">cufftComplex</samp>/<samp class="ph codeph">cufftDoubleComplex</samp> array in single- and double-precision modes respectively. In C2R mode an input array 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mo stretchy="false">(</mo>
                        <msub>
                           <mi>x</mi>
                           <mn>1</mn>
                        </msub>
                        <mo>,</mo>
                        <msub>
                           <mi>x</mi>
                           <mn>2</mn>
                        </msub>
                        <mo>,</mo>
                        <mo>…</mo>
                        <mo>,</mo>
                        <msub>
                           <mi>x</mi>
                           <mrow class="MJX-TeXAtom-ORD">
                              <mo fence="false" stretchy="false">⌊</mo>
                              <mfrac>
                                 <mi>N</mi>
                                 <mn>2</mn>
                              </mfrac>
                              <mo fence="false" stretchy="false">⌋</mo>
                              <mo>+</mo>
                              <mn>1</mn>
                           </mrow>
                        </msub>
                        <mo stretchy="false">)</mo>
                     </math> of only non-redundant complex elements is required. The output array 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mo stretchy="false">(</mo>
                        <msub>
                           <mi>X</mi>
                           <mn>1</mn>
                        </msub>
                        <mo>,</mo>
                        <msub>
                           <mi>X</mi>
                           <mn>2</mn>
                        </msub>
                        <mo>,</mo>
                        <mo>…</mo>
                        <mo>,</mo>
                        <msub>
                           <mi>X</mi>
                           <mi>N</mi>
                        </msub>
                        <mo stretchy="false">)</mo>
                     </math>  consists of <samp class="ph codeph">cufftReal</samp>/<samp class="ph codeph">cufftDouble</samp> elements in this mode. Finally, R2C demands an input array 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mo stretchy="false">(</mo>
                        <msub>
                           <mi>X</mi>
                           <mn>1</mn>
                        </msub>
                        <mo>,</mo>
                        <msub>
                           <mi>X</mi>
                           <mn>2</mn>
                        </msub>
                        <mo>,</mo>
                        <mo>…</mo>
                        <mo>,</mo>
                        <msub>
                           <mi>X</mi>
                           <mi>N</mi>
                        </msub>
                        <mo stretchy="false">)</mo>
                     </math>  of real values and returns an array 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mo stretchy="false">(</mo>
                        <msub>
                           <mi>x</mi>
                           <mn>1</mn>
                        </msub>
                        <mo>,</mo>
                        <msub>
                           <mi>x</mi>
                           <mn>2</mn>
                        </msub>
                        <mo>,</mo>
                        <mo>…</mo>
                        <mo>,</mo>
                        <msub>
                           <mi>x</mi>
                           <mrow class="MJX-TeXAtom-ORD">
                              <mo fence="false" stretchy="false">⌊</mo>
                              <mfrac>
                                 <mi>N</mi>
                                 <mn>2</mn>
                              </mfrac>
                              <mo fence="false" stretchy="false">⌋</mo>
                              <mo>+</mo>
                              <mn>1</mn>
                           </mrow>
                        </msub>
                        <mo stretchy="false">)</mo>
                     </math> of non-redundant complex elements.
                  </p>
                  <p class="p">In real-to-complex and complex-to-real transforms the size of input data and the size of output data differ. For out-of-place
                     transforms a separate array of appropriate size is created. For in-place transforms the user can specify one of two supported
                     data layouts: <samp class="ph codeph">native</samp> or <samp class="ph codeph">padded</samp>. The first is used for best performance and the latter for FFTW compatibility.
                  </p>
                  <p class="p">In the padded layout output signals begin at the same memory addresses as the input data. In other words - input data for
                     real-to-complex and output data for complex-to-real must be padded. In the native layout no padding is required and both input
                     and output data is formed as arrays of adequate types and sizes.
                  </p>
                  <p class="p">Sizes of input/output data for all types of transforms are summarized in the table below:</p>
                  <div class="tablenoborder"><a name="data-layout__table_2_1" shape="rect">
                        <!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="data-layout__table_2_1" class="table" frame="border" border="1" rules="all">
                        <thead class="thead" align="left">
                           <tr class="row">
                              <th class="entry" valign="top" width="25%" id="d54e981" rowspan="1" colspan="1">FFT type</th>
                              <th class="entry" valign="top" width="37.5%" id="d54e984" rowspan="1" colspan="1">input data size</th>
                              <th class="entry" valign="top" width="37.5%" id="d54e987" rowspan="1" colspan="1">output data size</th>
                           </tr>
                        </thead>
                        <tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="25%" headers="d54e981" rowspan="1" colspan="1">C2C</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e984" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <mi>x</mi>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e987" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <mi>x</mi>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="25%" headers="d54e981" rowspan="1" colspan="1">C2R</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e984" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <mfenced open="⌊" close="⌋">
                                       <mfrac>
                                          <mi>x</mi>
                                          <mn>2</mn>
                                       </mfrac>
                                    </mfenced>
                                    <mo>+</mo>
                                    <mn>1</mn>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e987" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <mi>x</mi>
                                 </math><samp class="ph codeph">cufftReal</samp></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="25%" headers="d54e981" rowspan="1" colspan="1">R2C*</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e984" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <mi>x</mi>
                                 </math><samp class="ph codeph">cufftReal</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e987" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <mfenced open="⌊" close="⌋">
                                       <mfrac>
                                          <mi>x</mi>
                                          <mn>2</mn>
                                       </mfrac>
                                    </mfenced>
                                    <mo>+</mo>
                                    <mn>1</mn>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
                  <p class="p">(*total transform size is limited to 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <msup>
                           <mtext>2</mtext>
                           <mtext>27</mtext>
                        </msup>
                     </math> (see <a class="xref" href="index.html#introduction" shape="rect">Introduction</a>) elements in in-place R2C single precision native transforms)
                  </p>
                  <p class="p">The real-to-complex transform is implicitly a forward transform. For an in-place real-to-complex transform where FFTW compatible
                     output is desired, the input size must be padded to 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mn>2</mn>
                        <mfenced open="(" close=")">
                           <mrow>
                              <mo fence="false" stretchy="false">⌊</mo>
                              <mfrac>
                                 <mi>N</mi>
                                 <mn>2</mn>
                              </mfrac>
                              <mo fence="false" stretchy="false">⌋</mo>
                              <mo>+</mo>
                              <mn>1</mn>
                           </mrow>
                        </mfenced>
                     </math> real elements. For out-of-place transforms, input and output strides match the logical transform size 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mi mathvariant="normal">N</mi>
                     </math> and the non-redundant size 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mo fence="false" stretchy="false">⌊</mo>
                        <mfrac>
                           <mi>N</mi>
                           <mn>2</mn>
                        </mfrac>
                        <mo fence="false" stretchy="false">⌋</mo>
                        <mo>+</mo>
                        <mn>1</mn>
                     </math>, respectively.
                  </p>
                  <p class="p">The complex-to-real transform is implicitly inverse. For in-place complex-to-real FFTs where FFTW compatible output is selected
                     (default padding mode, see <a class="xref" href="index.html#cufft-transform-directions" shape="rect">Parameters for Transform Direction</a> for details), the input stride is assumed to be 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mo fence="false" stretchy="false">⌊</mo>
                        <mfrac>
                           <mi>N</mi>
                           <mn>2</mn>
                        </mfrac>
                        <mo fence="false" stretchy="false">⌋</mo>
                        <mo>+</mo>
                        <mn>1</mn>
                     </math><samp class="ph codeph"> cufftComplex</samp> elements.For out-of-place transforms, input and output strides match the logical transform non-redundant size 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mo fence="false" stretchy="false">⌊</mo>
                        <mfrac>
                           <mi>N</mi>
                           <mn>2</mn>
                        </mfrac>
                        <mo fence="false" stretchy="false">⌋</mo>
                        <mo>+</mo>
                        <mn>1</mn>
                     </math> and size 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mi mathvariant="normal">N</mi>
                     </math>, respectively. 
                  </p>
                  <p class="p">Starting with CUFFT version 4.1, transforms with advanced data layout are supported through the <samp class="ph codeph">cufftPlanMany()</samp> function. In this mode, the developer can define strides between each element as well as between the signals in a batch (see
                     <a class="xref" href="index.html#advanced-data-layout" shape="rect">Advanced Data Layout</a>).
                  </p>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="fftw-compatibility-mode"><a name="fftw-compatibility-mode" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#fftw-compatibility-mode" name="fftw-compatibility-mode" shape="rect">2.4.1.&nbsp;FFTW Compatibility Mode</a></h3>
                  <div class="body conbody">
                     <p class="p">For some transform sizes, FFTW requires additional padding bytes between rows and planes of real-to-complex (R2C) and complex-to-real
                        (C2R) transforms of rank greater than 
                        <math xmlns="http://www.w3.org/1998/Math/MathML">
                           <mn>1</mn>
                        </math>. (For details, please refer to the <a class="xref" href="http://www.fftw.org" target="_blank" shape="rect">FFTW online documentation</a>.)
                     </p>
                     <p class="p">One can disable FFTW-compatible layout using <samp class="ph codeph">cufftSetCompatibilityMode()</samp>. Setting the input parameter to <samp class="ph codeph">CUFFT_COMPATIBILITY_NATIVE</samp> disables padding and ensures compact data layout for the input/output data for Real-to-Complex/Complex-To-Real transforms.
                        Disabling padding using CUFFT native mode can provide significant speed-up especially in power-of-two sized transforms.
                     </p>
                     <p class="p">The FFTW compatibility modes are as follows:</p>
                     <p class="p"><samp class="ph codeph">CUFFT_COMPATIBILITY_NATIVE</samp> mode disables FFTW compatibility and achieves the highest performance.
                     </p>
                     <p class="p"><samp class="ph codeph">CUFFT_COMPATIBILITY_FFTW_PADDING</samp> supports FFTW data padding by inserting extra padding between packed in-place transforms for batched transforms (default).
                     </p>
                     <p class="p"><samp class="ph codeph">CUFFT_COMPATIBILITY_FFTW_ASYMMETRIC</samp> guarantees FFTW-compatible output for non-symmetric complex inputs for transforms with power-of-2 size. This is only useful
                        for artificial (that is, random) data sets as actual data will always be symmetric if it has come from the real plane. Enabling
                        this mode can significantly impact performance.
                     </p>
                     <p class="p"><samp class="ph codeph">CUFFT_COMPATIBILITY_FFTW_ALL</samp> enables full FFTW compatibility (both <samp class="ph codeph">CUFFT_COMPATIBILITY_FFTW_PADDING</samp> and <samp class="ph codeph">CUFFT_COMPATIBILITY_FFTW_ASYMMETRIC</samp>).
                     </p>
                     <p class="p">Refer to the <a class="xref" href="http://www.fftw.org" target="_blank" shape="rect">FFTW online documentation</a> for detailed FFTW data layout specifications.
                     </p>
                     <p class="p">The default mode is <samp class="ph codeph">CUFFT_COMPATIBILITY_FFTW_PADDING</samp></p>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="multi-dimensional"><a name="multi-dimensional" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#multi-dimensional" name="multi-dimensional" shape="rect">2.5.&nbsp;Multidimensional transforms</a></h3>
               <div class="body conbody">
                  <p class="p">Multidimensional DFT transforms a 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mi>d</mi>
                     </math>-dimensional array 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <msub>
                           <mi>x</mi>
                           <mrow class="MJX-TeXAtom-ORD">
                              <mrow class="MJX-TeXAtom-ORD">
                                 <mi mathvariant="bold">n</mi>
                              </mrow>
                           </mrow>
                        </msub>
                     </math>, where 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mrow class="MJX-TeXAtom-ORD">
                           <mrow class="MJX-TeXAtom-ORD">
                              <mi mathvariant="bold">n</mi>
                           </mrow>
                        </mrow>
                        <mo>=</mo>
                        <mo stretchy="false">(</mo>
                        <msub>
                           <mi>n</mi>
                           <mn>1</mn>
                        </msub>
                        <mo>,</mo>
                        <msub>
                           <mi>n</mi>
                           <mn>2</mn>
                        </msub>
                        <mo>,</mo>
                        <mo>…</mo>
                        <mo>,</mo>
                        <msub>
                           <mi>n</mi>
                           <mi>d</mi>
                        </msub>
                        <mo stretchy="false">)</mo>
                     </math> into its frequency domain array given by:
                  </p>
                  <div class="tablenoborder"><a name="multi-dimensional__eq-1" shape="rect">
                        <!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="multi-dimensional__eq-1" class="table" frame="void" border="0" rules="none">
                        <tbody class="tbody">
                           <tr class="row">
                              <td class="entry" align="center" valign="top" width="100%" rowspan="1" colspan="1">
                                 <p class="p d4p_eqn_block">
                                    <math xmlns="http://www.w3.org/1998/Math/MathML">
                                       <msub>
                                          <mi>X</mi>
                                          <mi mathvariant="bold">k</mi>
                                       </msub>
                                       <mo>=</mo>
                                       <munderover>
                                          <mo>∑</mo>
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi>n</mi>
                                             <mo>=</mo>
                                             <mn>0</mn>
                                          </mrow>
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi>N</mi>
                                             <mo>−</mo>
                                             <mn>1</mn>
                                          </mrow>
                                       </munderover>
                                       <msub>
                                          <mi>x</mi>
                                          <mi mathvariant="bold">n</mi>
                                       </msub>
                                       <msup>
                                          <mi>e</mi>
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mn>-2</mn>
                                             <mi>π</mi>
                                             <mi>i</mi>
                                             <mfrac>
                                                <mrow>
                                                   <mi mathvariant="bold">k</mi>
                                                   <mi mathvariant="bold">n</mi>
                                                </mrow>
                                                <mi mathvariant="bold">N</mi>
                                             </mfrac>
                                          </mrow>
                                       </msup>
                                    </math>
                                 </p>
                              </td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
                  <p class="p">where 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mfrac>
                           <mrow class="MJX-TeXAtom-ORD">
                              <mi mathvariant="bold">n</mi>
                           </mrow>
                           <mrow class="MJX-TeXAtom-ORD">
                              <mi mathvariant="bold">N</mi>
                           </mrow>
                        </mfrac>
                        <mo>=</mo>
                        <mo stretchy="false">(</mo>
                        <mfrac>
                           <msub>
                              <mi>n</mi>
                              <mn>1</mn>
                           </msub>
                           <msub>
                              <mi>N</mi>
                              <mn>1</mn>
                           </msub>
                        </mfrac>
                        <mo>,</mo>
                        <mfrac>
                           <msub>
                              <mi>n</mi>
                              <mn>2</mn>
                           </msub>
                           <msub>
                              <mi>N</mi>
                              <mn>2</mn>
                           </msub>
                        </mfrac>
                        <mo>,</mo>
                        <mo>…</mo>
                        <mo>,</mo>
                        <mfrac>
                           <msub>
                              <mi>n</mi>
                              <mi>d</mi>
                           </msub>
                           <msub>
                              <mi>N</mi>
                              <mi>d</mi>
                           </msub>
                        </mfrac>
                        <mo stretchy="false">)</mo>
                     </math>,
                     and the summation denotes the set of nested summations 
                     
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <munderover>
                           <mo>∑</mo>
                           <mrow class="MJX-TeXAtom-ORD">
                              <msub>
                                 <mi>n</mi>
                                 <mn>1</mn>
                              </msub>
                              <mo>=</mo>
                              <mn>0</mn>
                           </mrow>
                           <mrow class="MJX-TeXAtom-ORD">
                              <msub>
                                 <mi>N</mi>
                                 <mn>1</mn>
                              </msub>
                              <mo>−</mo>
                              <mn>1</mn>
                           </mrow>
                        </munderover>
                        <munderover>
                           <mo>∑</mo>
                           <mrow class="MJX-TeXAtom-ORD">
                              <msub>
                                 <mi>n</mi>
                                 <mn>2</mn>
                              </msub>
                              <mo>=</mo>
                              <mn>0</mn>
                           </mrow>
                           <mrow class="MJX-TeXAtom-ORD">
                              <msub>
                                 <mi>N</mi>
                                 <mn>2</mn>
                              </msub>
                              <mo>−</mo>
                              <mn>1</mn>
                           </mrow>
                        </munderover>
                        <mo>…</mo>
                        <munderover>
                           <mo>∑</mo>
                           <mrow class="MJX-TeXAtom-ORD">
                              <msub>
                                 <mi>n</mi>
                                 <mi>d</mi>
                              </msub>
                              <mo>=</mo>
                              <mn>0</mn>
                           </mrow>
                           <mrow class="MJX-TeXAtom-ORD">
                              <msub>
                                 <mi>N</mi>
                                 <mi>d</mi>
                              </msub>
                              <mo>−</mo>
                              <mn>1</mn>
                           </mrow>
                        </munderover>
                     </math>
                  </p>
                  <p class="p">CUFFT supports one-dimensional, two-dimensional and three-dimensional transforms, which can all be called by the same <samp class="ph codeph">cufftExec*</samp> functions (see <a class="xref" href="index.html#fft-types" shape="rect">Fourier Transform Types</a>).
                  </p>
                  <p class="p">Similar to the one-dimensional case, the frequency domain representation of real-valued input data satisfies Hermitian symmetry,
                     defined as:
                     
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <msub>
                           <mi>x</mi>
                           <mrow class="MJX-TeXAtom-ORD">
                              <mo stretchy="false">(</mo>
                              <msub>
                                 <mi>n</mi>
                                 <mn>1</mn>
                              </msub>
                              <mo>,</mo>
                              <msub>
                                 <mi>n</mi>
                                 <mn>2</mn>
                              </msub>
                              <mo>,</mo>
                              <mo>…</mo>
                              <mo>,</mo>
                              <msub>
                                 <mi>n</mi>
                                 <mi>d</mi>
                              </msub>
                              <mo stretchy="false">)</mo>
                           </mrow>
                        </msub>
                        <mo>=</mo>
                        <msubsup>
                           <mi>x</mi>
                           <mrow class="MJX-TeXAtom-ORD">
                              <mo stretchy="false">(</mo>
                              <msub>
                                 <mi>N</mi>
                                 <mn>1</mn>
                              </msub>
                              <mo>−</mo>
                              <msub>
                                 <mi>n</mi>
                                 <mn>1</mn>
                              </msub>
                              <mo>,</mo>
                              <msub>
                                 <mi>N</mi>
                                 <mn>2</mn>
                              </msub>
                              <mo>−</mo>
                              <msub>
                                 <mi>n</mi>
                                 <mn>2</mn>
                              </msub>
                              <mo>,</mo>
                              <mo>…</mo>
                              <mo>,</mo>
                              <msub>
                                 <mi>N</mi>
                                 <mi>d</mi>
                              </msub>
                              <mo>−</mo>
                              <msub>
                                 <mi>n</mi>
                                 <mi>d</mi>
                              </msub>
                              <mo stretchy="false">)</mo>
                           </mrow>
                           <mo>∗</mo>
                        </msubsup>
                     </math>. 
                     
                  </p>
                  <p class="p">C2R and R2C algorithms take advantage of this fact by operating only on half of the elements of signal array, namely on:
                     
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <msub>
                           <mi>x</mi>
                           <mrow class="MJX-TeXAtom-ORD">
                              <mrow class="MJX-TeXAtom-ORD">
                                 <mi mathvariant="bold">n</mi>
                              </mrow>
                           </mrow>
                        </msub>
                     </math>
                     for 
                     
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mrow class="MJX-TeXAtom-ORD">
                           <mrow class="MJX-TeXAtom-ORD">
                              <mi mathvariant="bold">n</mi>
                           </mrow>
                        </mrow>
                        <mo>∈</mo>
                        <mo fence="false" stretchy="false">{</mo>
                        <mn>1</mn>
                        <mo>,</mo>
                        <mo>…</mo>
                        <mo>,</mo>
                        <msub>
                           <mi>N</mi>
                           <mn>1</mn>
                        </msub>
                        <mo fence="false" stretchy="false">}</mo>
                        <mo>×</mo>
                        <mo>…</mo>
                        <mo>×</mo>
                        <mo fence="false" stretchy="false">{</mo>
                        <mn>1</mn>
                        <mo>,</mo>
                        <mo>…</mo>
                        <mo>,</mo>
                        <msub>
                           <mi>N</mi>
                           <mrow class="MJX-TeXAtom-ORD">
                              <mi>d</mi>
                              <mo>−</mo>
                              <mn>1</mn>
                           </mrow>
                        </msub>
                        <mo fence="false" stretchy="false">}</mo>
                        <mo>×</mo>
                        <mo fence="false" stretchy="false">{</mo>
                        <mn>1</mn>
                        <mo>,</mo>
                        <mo>…</mo>
                        <mo>,</mo>
                        <mo fence="false" stretchy="false">⌊</mo>
                        <mfrac>
                           <msub>
                              <mi>N</mi>
                              <mi>d</mi>
                           </msub>
                           <mn>2</mn>
                        </mfrac>
                        <mo fence="false" stretchy="false">⌋</mo>
                        <mo>+</mo>
                        <mn>1</mn>
                        <mo fence="false" stretchy="false">}</mo>
                     </math>.
                     
                  </p>
                  <p class="p">The general rules of data alignment described in <a class="xref" href="index.html#data-layout" shape="rect">Data Layout</a> apply to higher-dimensional transforms. The following table summarizes input and output data sizes for multidimensional DFTs:
                  </p>
                  <div class="tablenoborder"><a name="multi-dimensional__table_2_1" shape="rect">
                        <!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="multi-dimensional__table_2_1" class="table" frame="border" border="1" rules="all">
                        <thead class="thead" align="left">
                           <tr class="row">
                              <th class="entry" valign="top" width="12.5%" id="d54e2118" rowspan="1" colspan="1">Dims</th>
                              <th class="entry" valign="top" width="12.5%" id="d54e2121" rowspan="1" colspan="1">FFT type</th>
                              <th class="entry" valign="top" width="37.5%" id="d54e2124" rowspan="1" colspan="1">Input data size</th>
                              <th class="entry" valign="top" width="37.5%" id="d54e2127" rowspan="1" colspan="1">Output data size</th>
                           </tr>
                        </thead>
                        <tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="12.5%" headers="d54e2118" rowspan="1" colspan="1">&nbsp;</td>
                              <td class="entry" valign="top" width="12.5%" headers="d54e2121" rowspan="1" colspan="1">C2C</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2124" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mn>1</mn>
                                    </msub>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2127" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mn>1</mn>
                                    </msub>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="12.5%" headers="d54e2118" rowspan="1" colspan="1">1D</td>
                              <td class="entry" valign="top" width="12.5%" headers="d54e2121" rowspan="1" colspan="1">C2R</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2124" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <mo fence="false" stretchy="false">⌊</mo>
                                    <mfrac>
                                       <msub>
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mrow class="MJX-TeXAtom-ORD">
                                                <mi mathvariant="bold">N</mi>
                                             </mrow>
                                          </mrow>
                                          <mn>1</mn>
                                       </msub>
                                       <mn>2</mn>
                                    </mfrac>
                                    <mo fence="false" stretchy="false">⌋</mo>
                                    <mo>+</mo>
                                    <mn>1</mn>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2127" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mn>1</mn>
                                    </msub>
                                 </math><samp class="ph codeph">cufftReal</samp></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="12.5%" headers="d54e2118" rowspan="1" colspan="1">&nbsp;</td>
                              <td class="entry" valign="top" width="12.5%" headers="d54e2121" rowspan="1" colspan="1">R2C</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2124" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mn>1</mn>
                                    </msub>
                                 </math><samp class="ph codeph">cufftReal</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2127" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <mo fence="false" stretchy="false">⌊</mo>
                                    <mfrac>
                                       <msub>
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mrow class="MJX-TeXAtom-ORD">
                                                <mi mathvariant="bold">N</mi>
                                             </mrow>
                                          </mrow>
                                          <mn>1</mn>
                                       </msub>
                                       <mn>2</mn>
                                    </mfrac>
                                    <mo fence="false" stretchy="false">⌋</mo>
                                    <mo>+</mo>
                                    <mn>1</mn>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="12.5%" headers="d54e2118" rowspan="1" colspan="1">&nbsp;</td>
                              <td class="entry" valign="top" width="12.5%" headers="d54e2121" rowspan="1" colspan="1">C2C</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2124" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>2</mn>
                                       </mrow>
                                    </msub>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2127" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>2</mn>
                                       </mrow>
                                    </msub>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="12.5%" headers="d54e2118" rowspan="1" colspan="1">2D</td>
                              <td class="entry" valign="top" width="12.5%" headers="d54e2121" rowspan="1" colspan="1">C2R</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2124" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <mo stretchy="false">(</mo>
                                    <mo fence="false" stretchy="false">⌊</mo>
                                    <mfrac>
                                       <msub>
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mrow class="MJX-TeXAtom-ORD">
                                                <mi mathvariant="bold">N</mi>
                                             </mrow>
                                          </mrow>
                                          <mn>2</mn>
                                       </msub>
                                       <mn>2</mn>
                                    </mfrac>
                                    <mo fence="false" stretchy="false">⌋</mo>
                                    <mo>+</mo>
                                    <mn>1</mn>
                                    <mo stretchy="false">)</mo>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2127" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>2</mn>
                                       </mrow>
                                    </msub>
                                 </math><samp class="ph codeph">cufftReal</samp></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="12.5%" headers="d54e2118" rowspan="1" colspan="1">&nbsp;</td>
                              <td class="entry" valign="top" width="12.5%" headers="d54e2121" rowspan="1" colspan="1">R2C</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2124" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>2</mn>
                                       </mrow>
                                    </msub>
                                 </math><samp class="ph codeph">cufftReal</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2127" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <mo stretchy="false">(</mo>
                                    <mo fence="false" stretchy="false">⌊</mo>
                                    <mfrac>
                                       <msub>
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mrow class="MJX-TeXAtom-ORD">
                                                <mi mathvariant="bold">N</mi>
                                             </mrow>
                                          </mrow>
                                          <mn>2</mn>
                                       </msub>
                                       <mn>2</mn>
                                    </mfrac>
                                    <mo fence="false" stretchy="false">⌋</mo>
                                    <mo>+</mo>
                                    <mn>1</mn>
                                    <mo stretchy="false">)</mo>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="12.5%" headers="d54e2118" rowspan="1" colspan="1">&nbsp;</td>
                              <td class="entry" valign="top" width="12.5%" headers="d54e2121" rowspan="1" colspan="1">C2C</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2124" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>2</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mn>3</mn>
                                    </msub>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2127" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>2</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mn>3</mn>
                                    </msub>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="12.5%" headers="d54e2118" rowspan="1" colspan="1">3D</td>
                              <td class="entry" valign="top" width="12.5%" headers="d54e2121" rowspan="1" colspan="1">C2R</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2124" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>2</mn>
                                       </mrow>
                                    </msub>
                                    <mo stretchy="false">(</mo>
                                    <mo fence="false" stretchy="false">⌊</mo>
                                    <mfrac>
                                       <msub>
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mrow class="MJX-TeXAtom-ORD">
                                                <mi mathvariant="bold">N</mi>
                                             </mrow>
                                          </mrow>
                                          <mn>3</mn>
                                       </msub>
                                       <mn>2</mn>
                                    </mfrac>
                                    <mo fence="false" stretchy="false">⌋</mo>
                                    <mo>+</mo>
                                    <mn>1</mn>
                                    <mo stretchy="false">)</mo>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2127" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>2</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mn>3</mn>
                                    </msub>
                                 </math><samp class="ph codeph">cufftReal</samp></td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="12.5%" headers="d54e2118" rowspan="1" colspan="1">&nbsp;</td>
                              <td class="entry" valign="top" width="12.5%" headers="d54e2121" rowspan="1" colspan="1">R2C</td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2124" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>2</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mn>3</mn>
                                    </msub>
                                 </math><samp class="ph codeph">cufftReal</samp></td>
                              <td class="entry" valign="top" width="37.5%" headers="d54e2127" rowspan="1" colspan="1">
                                 <math xmlns="http://www.w3.org/1998/Math/MathML">
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>1</mn>
                                       </mrow>
                                    </msub>
                                    <msub>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mi mathvariant="bold">N</mi>
                                          </mrow>
                                       </mrow>
                                       <mrow class="MJX-TeXAtom-ORD">
                                          <mn>2</mn>
                                       </mrow>
                                    </msub>
                                    <mo stretchy="false">(</mo>
                                    <mo fence="false" stretchy="false">⌊</mo>
                                    <mfrac>
                                       <msub>
                                          <mrow class="MJX-TeXAtom-ORD">
                                             <mrow class="MJX-TeXAtom-ORD">
                                                <mi mathvariant="bold">N</mi>
                                             </mrow>
                                          </mrow>
                                          <mn>3</mn>
                                       </msub>
                                       <mn>2</mn>
                                    </mfrac>
                                    <mo fence="false" stretchy="false">⌋</mo>
                                    <mo>+</mo>
                                    <mn>1</mn>
                                    <mo stretchy="false">)</mo>
                                 </math><samp class="ph codeph">cufftComplex</samp></td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
                  <p class="p">For example, static declaration of a three-dimensional array for the output of an out-of-place real-to-complex transform will
                     look like this:
                  </p><pre xml:space="preserve">cufftComplex float odata[N1][N2][N3/2+1];</pre></div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="advanced-data-layout"><a name="advanced-data-layout" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#advanced-data-layout" name="advanced-data-layout" shape="rect">2.6.&nbsp;Advanced Data Layout</a></h3>
               <div class="body conbody">
                  <p class="p">The advanced data layout feature allows transforming only a subset of an input array, or outputting to only a portion of a
                     larger data structure. It can be set by calling function:
                  </p><pre xml:space="preserve">cufftResult cufftPlanMany(cufftHandle *plan, int rank, int *n, int *inembed,
    int istride, int idist, int *onembed, int ostride,
    int odist, cufftType type, int batch);
</pre><p class="p">Passing <samp class="ph codeph">inembed</samp> or <samp class="ph codeph">onembed</samp> set to <samp class="ph codeph">NULL</samp> is a special case and is equivalent to passing <samp class="ph codeph">n</samp> for each. This is same as the basic data layout and other advanced parameters such as <samp class="ph codeph">istride</samp> are ignored.
                  </p>
                  <p class="p">If the advanced parameters are to be used, then all of the advanced interface parameters must be specified correctly. Advanced
                     parameters are defined in units of the relevant data type (<samp class="ph codeph">cufftReal</samp>, <samp class="ph codeph">cufftDoubleReal</samp>, <samp class="ph codeph">cufftComplex</samp>, or <samp class="ph codeph">cufftDoubleComplex</samp>).
                  </p>
                  <p class="p">Advanced layout can be perceived as an additional layer of abstraction above the access to input/output data arrays. An element
                     of coordinates <samp class="ph codeph">[z][y][x]</samp> in signal number <samp class="ph codeph">b</samp> in the batch will be associated with the following addresses in the memory:
                  </p>
                  <ul class="ul">
                     <li class="li">
                        <p class="p">1D</p>
                        <p class="p"><samp class="ph codeph">input[ </samp><samp class="ph codeph">b</samp> * <samp class="ph codeph">idist</samp> + <samp class="ph codeph">x</samp> * <samp class="ph codeph">istride</samp><samp class="ph codeph">]</samp></p>
                        <p class="p"><samp class="ph codeph">output[ </samp><samp class="ph codeph">b</samp> * <samp class="ph codeph">odist</samp> + <samp class="ph codeph">x</samp> * <samp class="ph codeph">ostride</samp><samp class="ph codeph">]</samp></p>
                     </li>
                     <li class="li">
                        <p class="p">2D</p>
                        <p class="p"><samp class="ph codeph">input[</samp><samp class="ph codeph">b</samp> * <samp class="ph codeph">idist</samp> + (<samp class="ph codeph">x</samp> * <samp class="ph codeph">inembed[1]</samp> + <samp class="ph codeph">y</samp>) * <samp class="ph codeph">istride</samp><samp class="ph codeph">]</samp></p>
                        <p class="p"><samp class="ph codeph">output[</samp><samp class="ph codeph">b</samp> * <samp class="ph codeph">odist</samp> + (<samp class="ph codeph">x</samp> * <samp class="ph codeph">onembed[1]</samp> + <samp class="ph codeph">y</samp>) * <samp class="ph codeph">ostride</samp><samp class="ph codeph">]</samp></p>
                     </li>
                     <li class="li">
                        <p class="p">3D</p>
                        <p class="p"><samp class="ph codeph">input[</samp><samp class="ph codeph">b</samp> * <samp class="ph codeph">idist</samp> + ((<samp class="ph codeph">x</samp> * <samp class="ph codeph">inembed[1]</samp> + <samp class="ph codeph">y</samp>) * <samp class="ph codeph">inembed[2]</samp> + <samp class="ph codeph">z</samp>) *  <samp class="ph codeph">istride</samp><samp class="ph codeph">]</samp></p>
                        <p class="p"><samp class="ph codeph">output[</samp><samp class="ph codeph">b</samp> * <samp class="ph codeph">odist</samp> + ((<samp class="ph codeph">x</samp> * <samp class="ph codeph">onembed[1]</samp> + <samp class="ph codeph">y</samp>) * <samp class="ph codeph">onembed[2]</samp> + <samp class="ph codeph">z</samp>) *  <samp class="ph codeph">ostride</samp><samp class="ph codeph">]</samp></p>
                     </li>
                  </ul>
                  <p class="p">The <samp class="ph codeph">istride</samp> and <samp class="ph codeph">ostride</samp> parameters denote the distance between two successive input and output elements in the least significant (that is, the innermost)
                     dimension respectively. In a 1D transform, if every input element is to be used in the transform, <samp class="ph codeph">istride</samp> should be set to 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mn>1</mn>
                     </math>; if every other input element is to be used in the transform, then <samp class="ph codeph">istride</samp> should be set to 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mn>2</mn>
                     </math>. Similarly, in a 1D transform, if it is desired to output final elements one after another compactly, <samp class="ph codeph">ostride</samp> should be set to 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mn>1</mn>
                     </math>; if spacing is desired between the least significant dimension output data, <samp class="ph codeph">ostride</samp> should be set to the distance between the elements.
                  </p>
                  <p class="p">The <samp class="ph codeph">inembed</samp> and <samp class="ph codeph">onembed</samp> parameters define the number of elements in each dimension in the input array and the output array respectively. The <samp class="ph codeph">inembed[rank-1]</samp> contains the number of elements in the least significant (innermost) dimension of the input data excluding the <samp class="ph codeph">istride</samp> elements; the number of total elements in the least significant dimension of the input array is then <samp class="ph codeph">istride*inembed[rank-1]</samp>. The <samp class="ph codeph">inembed[0]</samp> or <samp class="ph codeph">onembed[0]</samp> corresponds to the most significant (that is, the outermost) dimension and is effectively ignored since the <samp class="ph codeph">idist</samp> or <samp class="ph codeph">odist</samp> parameter provides this information instead. Note that the size of each dimension of the transform should be less than or
                     equal to the <samp class="ph codeph">inembed</samp> and <samp class="ph codeph">onembed</samp> values for the corresponding dimension, that is <samp class="ph codeph">n[<em class="ph i">i</em>]</samp> ≤ <samp class="ph codeph">inembed[<em class="ph i">i</em>]</samp>, <samp class="ph codeph">n[<em class="ph i">i</em>]</samp> ≤ <samp class="ph codeph">onembed[<em class="ph i">i</em>]</samp>, where  
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mi>i</mi>
                        <mo>∈</mo>
                        <mo fence="false" stretchy="false">{</mo>
                        <mn>0</mn>
                        <mo>,</mo>
                        <mo>…</mo>
                        <mo>,</mo>
                        <mi>r</mi>
                        <mi>a</mi>
                        <mi>n</mi>
                        <mi>k</mi>
                        <mo>−</mo>
                        <mn>1</mn>
                        <mo fence="false" stretchy="false">}</mo>
                     </math>.
                  </p>
                  <p class="p">The <samp class="ph codeph">idist</samp> and <samp class="ph codeph">odist</samp> parameters indicate the distance between the first element of two consecutive batches in the input and output data. One can
                     derive the total input data size as <samp class="ph codeph">idist*batch</samp> in units of transform elements (e.g. <samp class="ph codeph">cufftComplex</samp> in a C2C single-precision transform).
                  </p>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="streamed-cufft-transforms"><a name="streamed-cufft-transforms" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#streamed-cufft-transforms" name="streamed-cufft-transforms" shape="rect">2.7.&nbsp;Streamed CUFFT Transforms</a></h3>
               <div class="body conbody">
                  <p class="p">Every CUFFT plan may be associated with a CUDA stream. Once so associated, all launches of the internal stages of that plan
                     take place through the specified stream. Streaming of CUFFT execution allows for potential overlap between transforms and
                     memory copies. (See the <dfn class="term">NVIDIA CUDA Programming Guide</dfn> for more information on streams.) If no stream is associated with a plan, launches take place in <samp class="ph codeph">stream(0)</samp>, the default CUDA stream, and no overlap will be possible. Note that many plan executions require multiple kernel launches.
                  </p>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="thread-safety"><a name="thread-safety" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#thread-safety" name="thread-safety" shape="rect">2.8.&nbsp;Thread Safety</a></h3>
               <div class="body conbody">
                  <p class="p">Starting with CUFFT version 4.1, the CUFFT Library is thread safe and its functions can be called from multiple host threads,
                     even with the same plan (<samp class="ph codeph">cufftHandle</samp>). The only requirement is that the output data memory intervals are disjoint.
                  </p>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="accuracy-and-performance"><a name="accuracy-and-performance" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#accuracy-and-performance" name="accuracy-and-performance" shape="rect">2.9.&nbsp;Accuracy and Performance</a></h3>
               <div class="body conbody">
                  <p class="p">A general DFT can be implemented as a matrix vector multiplication that requires 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mi mathvariant="normal">O</mi>
                        <mo stretchy="false">(</mo>
                        <msup>
                           <mi mathvariant="normal">N</mi>
                           <mn>2</mn>
                        </msup>
                        <mo stretchy="false">)</mo>
                     </math> operations. However, the CUFFT Library employs the <a class="xref" href="http://en.wikipedia.org/wiki/Cooley-Tukey_FFT_algorithm" target="_blank" shape="rect">Cooley-Tukey algorithm</a> to reduce the number of required operations to optimize the performance of particular transform sizes. This algorithm expresses
                     a DFT recursively in terms of smaller DFT building blocks. The CUFFT Library implements the following DFT building blocks:
                     radix-2, radix-3, radix-5, and radix-7. Hence the performance of any transform size that can be factored as
                     
                     
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <msup>
                           <mn>2</mn>
                           <mi>a</mi>
                        </msup>
                        <mo>×</mo>
                        <msup>
                           <mn>3</mn>
                           <mi>b</mi>
                        </msup>
                        <mo>×</mo>
                        <msup>
                           <mn>5</mn>
                           <mi>c</mi>
                        </msup>
                        <mo>×</mo>
                        <msup>
                           <mn>7</mn>
                           <mi>d</mi>
                        </msup>
                     </math>
                     
                     (where <dfn class="term">a</dfn>, <dfn class="term">b</dfn>, <dfn class="term">c</dfn>, and  <dfn class="term">d</dfn> are non-negative integers) is optimized in the CUFFT library. There are also radix-m building blocks for other primes, m,
                     whose value is &lt; 128. When the length cannot be decomposed as multiples of powers of primes from 2 to 127, <a class="xref" href="http://en.wikipedia.org/wiki/Bluestein's_FFT_algorithm" target="_blank" shape="rect">Bluestein's algorithm</a> is used. The accuracy of the Bluestein implementation degrades with larger sizes compared to the pure Cooley-Tukey implementation,
                     specifically in single-precision mode, due to the accumulation of floating-point operation inaccuracies. The pure Cooley-Tukey
                     implementation has excellent accuracy, with the relative error growing proportionally to
                     	
                     	
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <msub>
                           <mi>log</mi>
                           <mn>2</mn>
                        </msub>
                        <mo>⁡</mo>
                        <mo stretchy="false">(</mo>
                        <mrow class="MJX-TeXAtom-ORD">
                           <mi mathvariant="normal">N</mi>
                        </mrow>
                        <mo stretchy="false">)</mo>
                     </math>
                     	
                     , where 
                     <math xmlns="http://www.w3.org/1998/Math/MathML">
                        <mi mathvariant="normal">N</mi>
                     </math> is the transform size in points.
                  </p>
                  <p class="p">For sizes handled by the Cooley-Tukey code path, the most efficient implementation is obtained by applying the following constraints
                     (listed in order from the most generic to the most specialized constraint, with each subsequent constraint providing the potential
                     of an additional performance improvement).
                  </p>
                  <ul class="ul">
                     <li class="li"><em class="ph i">Restrict the size along all dimensions to be representable as 
                           <math xmlns="http://www.w3.org/1998/Math/MathML">
                              <msup>
                                 <mn>2</mn>
                                 <mi>a</mi>
                              </msup>
                              <mo>×</mo>
                              <msup>
                                 <mn>3</mn>
                                 <mi>b</mi>
                              </msup>
                              <mo>×</mo>
                              <msup>
                                 <mn>5</mn>
                                 <mi>c</mi>
                              </msup>
                              <mo>×</mo>
                              <msup>
                                 <mn>7</mn>
                                 <mi>d</mi>
                              </msup>
                           </math>.</em><p class="p">The CUFFT library has highly optimized kernels for transforms whose dimensions have these prime factors.</p>
                        <p class="p"></p>
                     </li>
                     <li class="li">
                        <p class="p"><em class="ph i">Restrict the size along each dimension to use fewer distinct prime factors.</em></p>
                        <p class="p">For example, a transform of size 
                           <math xmlns="http://www.w3.org/1998/Math/MathML">
                              <msup>
                                 <mn>3</mn>
                                 <mi>n</mi>
                              </msup>
                           </math> will usually be faster than one of size 
                           <math xmlns="http://www.w3.org/1998/Math/MathML">
                              <msup>
                                 <mn>2</mn>
                                 <mi>i</mi>
                              </msup>
                              <mo>×</mo>
                              <msup>
                                 <mn>3</mn>
                                 <mi>j</mi>
                              </msup>
                           </math> even if the latter is slightly smaller.
                        </p>
                        <p class="p"></p>
                     </li>
                     <li class="li">
                        <p class="p"><em class="ph i">Restrict the power-of-two factorization term of the x dimension to be a multiple of either 256 for single-precision transforms
                              or 64 for double-precision transforms.</em></p>
                        <p class="p">This further aids with memory coalescing.</p>
                        <p class="p"></p>
                     </li>
                     <li class="li">
                        <p class="p"><em class="ph i">Restrict the x dimension of single-precision transforms to be strictly a power of two either between 2 and 8192 for Fermi-class,
                              Kepler-class, and more recent GPUs or between 2 and 2048 for earlier architectures.</em></p>
                        <p class="p">These transforms are implemented as specialized hand-coded kernels that keep all intermediate results in shared memory.</p>
                        <p class="p"></p>
                     </li>
                     <li class="li">
                        <p class="p"><em class="ph i">Use <samp class="ph codeph">native</samp> compatibility mode for in-place complex-to-real or real-to-complex transforms.</em></p>
                        <p class="p">    This scheme reduces the write/read of padding bytes hence helping with coalescing of the data.</p>
                     </li>
                  </ul>
                  <p class="p">Starting with version 3.1 of the CUFFT Library, the conjugate symmetry property of real-to-complex output data arrays and
                     complex-to-real input data arrays is exploited when the power-of-two factorization term of the <dfn class="term">x</dfn> dimension is at least a multiple of 4. Large 1D sizes (powers-of-two larger than 65,536), 2D, and 3D transforms benefit the
                     most from the performance optimizations in the implementation of real-to-complex or complex-to-real transforms.
                  </p>
               </div>
            </div>
         </div>
         <div class="topic concept nested0" xml:lang="en-us" id="cufft-api-reference"><a name="cufft-api-reference" shape="rect">
               <!-- --></a><h2 class="title topictitle1"><a href="#cufft-api-reference" name="cufft-api-reference" shape="rect">3.&nbsp;CUFFT API Reference</a></h2>
            <div class="body conbody">
               <p class="p">This chapter specifies the behavior of the CUFFT library functions by describing their input/output parameters, data types,
                  and error codes. The CUFFT library is initialized upon the first invocation of an API function, and CUFFT shuts down automatically
                  when all user-created FFT plans are destroyed. 
               </p>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="cufftresult"><a name="cufftresult" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#cufftresult" name="cufftresult" shape="rect">3.1.&nbsp;Return value cufftResult</a></h3>
               <div class="body conbody">
                  <p class="p">All CUFFT Library return values except for <samp class="ph codeph">CUFFT_SUCCESS</samp> indicate that the current API call failed and the user should reconfigure to correct the problem. The possible return values
                     are defined as follows:
                  </p><pre xml:space="preserve">
typedef enum cufftResult_t {
    CUFFT_SUCCESS        = 0,  //  The CUFFT operation was successful
    CUFFT_INVALID_PLAN   = 1,  //  CUFFT was passed an invalid plan handle
    CUFFT_ALLOC_FAILED   = 2,  //  CUFFT failed to allocate GPU or CPU memory
    CUFFT_INVALID_TYPE   = 3,  //  No longer used
    CUFFT_INVALID_VALUE  = 4,  //  User specified an invalid pointer or parameter
    CUFFT_INTERNAL_ERROR = 5,  //  Driver or internal CUFFT library error
    CUFFT_EXEC_FAILED    = 6,  //  Failed to execute an FFT on the GPU
    CUFFT_SETUP_FAILED   = 7,  //  The CUFFT library failed to initialize
    CUFFT_INVALID_SIZE   = 8,  //  User specified an invalid transform size
    CUFFT_UNALIGNED_DATA = 9,  //  No longer used
    CUFFT_INVALID_DEVICE = 10, //  Plan creation and execution are on different device
    CUFFT_NO_WORKSPACE   = 11  //  Workspace not initialized
} cufftResult;
</pre><p class="p">Users are encouraged to check return values from CUFFT functions for errors as shown in <a class="xref" href="index.html#cufft-code-examples" shape="rect">CUFFT Code Examples</a>.
                  </p>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="plan-basic"><a name="plan-basic" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#plan-basic" name="plan-basic" shape="rect">3.2.&nbsp;CUFFT Basic Plans</a></h3>
               <div class="body conbody"></div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftplan1d"><a name="function-cufftplan1d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftplan1d" name="function-cufftplan1d" shape="rect">3.2.1.&nbsp;Function cufftPlan1d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftPlan1d(cufftHandle *plan, int nx, cufftType type, int batch)
</pre><p class="p">Creates a 1D FFT plan configuration for a specified signal size and data type. The <samp class="ph codeph">batch</samp> input parameter tells CUFFT how many 1D transforms to configure.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size (e.g. 256 for a 256-point FFT)</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_C2C</samp> for single precision complex to complex)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">batch</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of transforms of size <samp class="ph codeph">nx</samp></td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains a CUFFT 1D plan handle value</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully created the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">nx</samp> or <samp class="ph codeph">batch</samp> parameter is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftplan2d"><a name="function-cufftplan2d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftplan2d" name="function-cufftplan2d" shape="rect">3.2.2.&nbsp;Function cufftPlan2d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftPlan2d(cufftHandle *plan, int nx, int ny, cufftType type)
</pre><p class="p">Creates a 2D FFT plan configuration according to specified signal sizes and data type.</p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">x</dfn> dimension (number of rows)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ny</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">y</dfn> dimension (number of columns)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_C2R</samp> for single precision complex to real)
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains a CUFFT 2D plan handle value</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully created the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Either or both of the <samp class="ph codeph">nx</samp> or <samp class="ph codeph">ny</samp> parameters is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftplan3d"><a name="function-cufftplan3d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftplan3d" name="function-cufftplan3d" shape="rect">3.2.3.&nbsp;Function cufftPlan3d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftPlan3d(cufftHandle *plan, int nx, int ny, int nz, cufftType type)
</pre><p class="p">Creates a 3D FFT plan configuration according to specified signal sizes and data type. This function is the same as <samp class="ph codeph">cufftPlan2d()</samp> except that it takes a third size parameter <samp class="ph codeph">nz</samp>.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">x</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ny</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">y</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nz</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">z</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_R2C</samp> for single precision real to complex)
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains a CUFFT 3D plan handle value</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully created the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more of the <samp class="ph codeph">nx</samp>, <samp class="ph codeph">ny</samp>, or <samp class="ph codeph">nz</samp> parameters is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftplanmany"><a name="function-cufftplanmany" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftplanmany" name="function-cufftplanmany" shape="rect">3.2.4.&nbsp;Function cufftPlanMany()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftPlanMany(cufftHandle *plan, int rank, int *n, int *inembed,
        int istride, int idist, int *onembed, int ostride,
        int odist, cufftType type, int batch);
</pre><p class="p">Creates a FFT plan configuration of dimension <samp class="ph codeph">rank</samp>, with sizes specified in the array <samp class="ph codeph">n</samp>. The <samp class="ph codeph">batch</samp> input parameter tells CUFFT how many transforms to configure. With this function, batched plans of 1, 2, or 3 dimensions
                        may be created.
                     </p>
                     <p class="p">The <samp class="ph codeph">cufftPlanMany()</samp> API supports more complicated input and output data layouts via the advanced data layout parameters: <samp class="ph codeph">inembed</samp>, <samp class="ph codeph">istride</samp>, <samp class="ph codeph">idist</samp>, <samp class="ph codeph">onembed</samp>, <samp class="ph codeph">ostride</samp>, and <samp class="ph codeph">odist</samp>.
                     </p>
                     <p class="p">All arrays are assumed to be in CPU memory.</p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">rank</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Dimensionality of the transform (1, 2, or 3)</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">n</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">rank</samp>, describing the size of each dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">inembed</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer of size <samp class="ph codeph">rank</samp> that indicates the storage dimensions of the input data in memory. If set to NULL all other advanced data layout parameters
                                    are ignored.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">istride</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">idist</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between the first element of two consecutive signals in a batch of the input data</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">onembed</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer of size <samp class="ph codeph">rank</samp> that indicates the storage dimensions of the output data in memory. If set to NULL all other advanced data layout parameters
                                    are ignored.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ostride</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost)
                                    dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">odist</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between the first element of two consecutive signals in a batch of the output data</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_R2C</samp> for single precision real to complex)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">batch</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Batch size for this transform</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains a CUFFT plan handle</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully created the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more of the parameters is not a supported size.</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="plan-extensible"><a name="plan-extensible" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#plan-extensible" name="plan-extensible" shape="rect">3.3.&nbsp;CUFFT Extensible Plans</a></h3>
               <div class="body conbody">
                  <p class="p">This API separates handle creation from plan generation. This makes it possible to change plan settings, which may alter the
                     outcome of the plan generation phase, before the plan is actually generated. The same cufftExecute calls are used to execute
                     all plans, whether generated with this API or with the original API.
                  </p>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftcreate"><a name="function-cufftcreate" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftcreate" name="function-cufftcreate" shape="rect">3.3.1.&nbsp;Function cufftCreate()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftCreate(cufftHandle *plan)
</pre><p class="p">Creates only an opaque handle, and allocates small data structures on the host. The <samp class="ph codeph">cufftMakePlan*()</samp> calls actually do the plan generation. It is recommended that <samp class="ph codeph">cufftSet*()</samp> calls, such as <samp class="ph codeph">cufftSetCompatibilityMode()</samp>, that may require a plan to be broken down and re-generated, should be made after <samp class="ph codeph">cufftCreate()</samp> and before one of the <samp class="ph codeph">cufftMakePlan*()</samp> calls.
                        
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains a CUFFT plan handle value</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully created the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">nx</samp> parameter is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftmakeplan1d"><a name="function-cufftmakeplan1d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftmakeplan1d" name="function-cufftmakeplan1d" shape="rect">3.3.2.&nbsp;Function cufftMakePlan1d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftMakePlan1d(cufftHandle *plan, int nx, cufftType type, int batch)
</pre><p class="p">Following a call to <samp class="ph codeph">cufftCreate()</samp> makes a 1D FFT plan configuration for a specified signal size and data type. The <samp class="ph codeph">batch</samp> input parameter tells CUFFT how many 1D transforms to configure.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size (e.g. 256 for a 256-point FFT)</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_C2C</samp> for single precision complex to complex)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">batch</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of transforms of size <samp class="ph codeph">nx</samp></td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains a CUFFT 1D plan handle value</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully created the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">nx</samp> or <samp class="ph codeph">batch</samp> parameter is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftmakeplan2d"><a name="function-cufftmakeplan2d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftmakeplan2d" name="function-cufftmakeplan2d" shape="rect">3.3.3.&nbsp;Function cufftMakePlan2d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftMakePlan2d(cufftHandle *plan, int nx, int ny, cufftType type)
</pre><p class="p">Following a call to <samp class="ph codeph">cufftCreate()</samp> makes
                        a 2D FFT plan configuration according to specified signal sizes and data type.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">x</dfn> dimension (number of rows)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ny</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">y</dfn> dimension (number of columns)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_C2R</samp> for single precision complex to real)
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains a CUFFT 2D plan handle value</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully created the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Either or both of the <samp class="ph codeph">nx</samp> or <samp class="ph codeph">ny</samp> parameters is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftmakeplan3d"><a name="function-cufftmakeplan3d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftmakeplan3d" name="function-cufftmakeplan3d" shape="rect">3.3.4.&nbsp;Function cufftMakePlan3d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftMakePlan3d(cufftHandle *plan, int nx, int ny, int nz, cufftType type)
</pre><p class="p">Following a call to <samp class="ph codeph">cufftCreate()</samp> makes a 3D FFT plan configuration according to specified signal sizes and data type. This function is the same as <samp class="ph codeph">cufftPlan2d()</samp> except that it takes a third size parameter <samp class="ph codeph">nz</samp>.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">x</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ny</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">y</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nz</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">z</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_R2C</samp> for single precision real to complex)
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains a CUFFT 3D plan handle value</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully created the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more of the <samp class="ph codeph">nx</samp>, <samp class="ph codeph">ny</samp>, or <samp class="ph codeph">nz</samp> parameters is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftmakeplanmany"><a name="function-cufftmakeplanmany" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftmakeplanmany" name="function-cufftmakeplanmany" shape="rect">3.3.5.&nbsp;Function cufftMakePlanMany()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftMakePlanMany(cufftHandle *plan, int rank, int *n, int *inembed,
        int istride, int idist, int *onembed, int ostride,
        int odist, cufftType type, int batch);
</pre><p class="p">Following a call to <samp class="ph codeph">cufftCreate()</samp> makes a FFT plan configuration of dimension <samp class="ph codeph">rank</samp>, with sizes specified in the array <samp class="ph codeph">n</samp>. The <samp class="ph codeph">batch</samp> input parameter tells CUFFT how many transforms to configure. With this function, batched plans of 1, 2, or 3 dimensions
                        may be created.
                     </p>
                     <p class="p">The <samp class="ph codeph">cufftPlanMany()</samp> API supports more complicated input and output data layouts via the advanced data layout parameters: <samp class="ph codeph">inembed</samp>, <samp class="ph codeph">istride</samp>, <samp class="ph codeph">idist</samp>, <samp class="ph codeph">onembed</samp>, <samp class="ph codeph">ostride</samp>, and <samp class="ph codeph">odist</samp>.
                     </p>
                     <p class="p">All arrays are assumed to be in CPU memory.</p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">rank</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Dimensionality of the transform (1, 2, or 3)</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">n</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">rank</samp>, describing the size of each dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">inembed</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer of size <samp class="ph codeph">rank</samp> that indicates the storage dimensions of the input data in memory. If set to NULL all other advanced data layout parameters
                                    are ignored.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">istride</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">idist</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between the first element of two consecutive signals in a batch of the input data</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">onembed</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer of size <samp class="ph codeph">rank</samp> that indicates the storage dimensions of the output data in memory. If set to NULL all other advanced data layout parameters
                                    are ignored.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ostride</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost)
                                    dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">odist</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between the first element of two consecutive signals in a batch of the output data</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_R2C</samp> for single precision real to complex)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">batch</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Batch size for this transform</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains a CUFFT plan handle</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully created the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more of the parameters is not a supported size.</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="work-estimate"><a name="work-estimate" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#work-estimate" name="work-estimate" shape="rect">3.4.&nbsp;CUFFT Estimated Size of Work Area</a></h3>
               <div class="body conbody">
                  <p class="p">During plan execution, CUFFT requires a work area for temporary storage of intermediate results. The <samp class="ph codeph">cufftEstimate*()</samp> calls return an estimate for the size of the work area required, given the specified parameters, and assuming default plan
                     settings. Some problem sizes require much more storage than others. In particular powers of 2 are very efficient in terms
                     of temporary storage. Large prime numbers, however, use different algorithms and may need up to the eight times that of a
                     similarly sized power of 2. These routines return estimated <samp class="ph codeph">workSize</samp> values which may still be smaller than the actual values needed especially for values of <samp class="ph codeph">n</samp> that are not multiples of powers of 2, 3, 5 and 7. More refined values are given by the <samp class="ph codeph">cufftGetSize*()</samp> routines, but these values may still be conservative.
                  </p>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftestimate1d"><a name="function-cufftestimate1d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftestimate1d" name="function-cufftestimate1d" shape="rect">3.4.1.&nbsp;Function cufftEstimate1d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftEstimate1d(int nx, cufftType type, int batch, size_t *workSize)
</pre><p class="p">During plan execution, CUFFT requires a work area for temporary storage of intermediate results. This call returns an estimate
                        for the size of the work area required, given the specified parameters, and assuming default plan settings. Note that changing
                        some plan settings, such as compatibility mode, may alter the size required for the work area.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size (e.g. 256 for a 256-point FFT)</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_C2C</samp> for single precision complex to complex)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">batch</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of transforms of size <samp class="ph codeph">nx</samp></td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully returned the size of the work space.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">nx</samp> parameter is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftestimate2d"><a name="function-cufftestimate2d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftestimate2d" name="function-cufftestimate2d" shape="rect">3.4.2.&nbsp;Function cufftEstimate2d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftEstimate2d(int nx, int ny, cufftType type, size_t *workSize)
</pre><p class="p">During plan execution, CUFFT requires a work area for temporary storage of intermediate results. This call returns an estimate
                        for the size of the work area required, given the specified parameters, and assuming default plan settings. Note that changing
                        some plan settings, such as compatibility mode, may alter the size required for the work area.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">x</dfn> dimension (number of rows)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ny</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">y</dfn> dimension (number of columns)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_C2R</samp> for single precision complex to real)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully returned the size of the work space.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Either or both of the <samp class="ph codeph">nx</samp> or <samp class="ph codeph">ny</samp> parameters is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftestimate3d"><a name="function-cufftestimate3d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftestimate3d" name="function-cufftestimate3d" shape="rect">3.4.3.&nbsp;Function cufftEstimate3d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftEstimate3d(int nx, int ny, int nz, cufftType type, size_t *workSize)
</pre><p class="p">During plan execution, CUFFT requires a work area for temporary storage of intermediate results. This call returns an estimate
                        for the size of the work area required, given the specified parameters, and assuming default plan settings. Note that changing
                        some plan settings, such as compatibility mode, may alter the size required for the work area.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">x</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ny</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">y</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nz</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">z</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_R2C</samp> for single precision real to complex)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully returned the size of the work space.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more of the <samp class="ph codeph">nx</samp>, <samp class="ph codeph">ny</samp>, or <samp class="ph codeph">nz</samp> parameters is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftestimatemany"><a name="function-cufftestimatemany" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftestimatemany" name="function-cufftestimatemany" shape="rect">3.4.4.&nbsp;Function cufftEstimateMany()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftEstimateMany(*plan, int rank, int *n, int *inembed,
        int istride, int idist, int *onembed, int ostride,
        int odist, cufftType type, int batch, size_t *workSize);
</pre><p class="p">During plan execution, CUFFT requires a work area for temporary storage of intermediate results. This call returns an estimate
                        for the size of the work area required, given the specified parameters, and assuming default plan settings. Note that changing
                        some plan settings, such as compatibility mode, may alter the size required for the work area.
                     </p>
                     <p class="p">The <samp class="ph codeph">cufftPlanMany()</samp> API supports more complicated input and output data layouts via the advanced data layout parameters: <samp class="ph codeph">inembed</samp>, <samp class="ph codeph">istride</samp>, <samp class="ph codeph">idist</samp>, <samp class="ph codeph">onembed</samp>, <samp class="ph codeph">ostride</samp>, and <samp class="ph codeph">odist</samp>.
                     </p>
                     <p class="p">All arrays are assumed to be in CPU memory.</p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">rank</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Dimensionality of the transform (1, 2, or 3)</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">n</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">rank</samp>, describing the size of each dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">inembed</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer of size <samp class="ph codeph">rank</samp> that indicates the storage dimensions of the input data in memory. If set to NULL all other advanced data layout parameters
                                    are ignored.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">istride</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">idist</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between the first element of two consecutive signals in a batch of the input data</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">onembed</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer of size <samp class="ph codeph">rank</samp> that indicates the storage dimensions of the output data in memory. If set to NULL all other advanced data layout parameters
                                    are ignored.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ostride</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost)
                                    dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">odist</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between the first element of two consecutive signals in a batch of the output data</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_R2C</samp> for single precision real to complex)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">batch</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Batch size for this transform</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully returned the size of the work space.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more of the parameters is not a supported size.</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="work-estimate-refined"><a name="work-estimate-refined" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#work-estimate-refined" name="work-estimate-refined" shape="rect">3.5.&nbsp;CUFFT Refined Estimated Size of Work Area</a></h3>
               <div class="body conbody">
                  <p class="p">The <samp class="ph codeph">cufftGetSize*()</samp> routines give a more accurate estimate of the work area size required for a plan than the <samp class="ph codeph">cufftEstimate*()</samp> routines as they take into account any plan settings that may have been made. As discussed in the section <a class="xref" href="index.html#work-estimate" shape="rect">CUFFT Estimated Size of Work Area</a>, the <samp class="ph codeph">workSize</samp> value returned may be conservative especially for values of <samp class="ph codeph">n</samp> that are not  multiples of powers of 2, 3, 5 and 7.
                  </p>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftgetsize1d"><a name="function-cufftgetsize1d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftgetsize1d" name="function-cufftgetsize1d" shape="rect">3.5.1.&nbsp;Function cufftGetSize1d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftGetSize1d(cufftHandle *plan, int nx, cufftType type, int batch, size_t *workSize)
</pre><p class="p">This call gives a more accurate estimate of the work area size required for a plan than <samp class="ph codeph">cufftEstimate1d()</samp>, given the specified parameters, and taking into account any plan settings that may have been made.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size (e.g. 256 for a 256-point FFT)</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_C2C</samp> for single precision complex to complex)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">batch</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Number of transforms of size <samp class="ph codeph">nx</samp></td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully returned the size of the work space.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">nx</samp> parameter is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftgetsize2d"><a name="function-cufftgetsize2d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftgetsize2d" name="function-cufftgetsize2d" shape="rect">3.5.2.&nbsp;Function cufftGetSize2d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftGetSize2d(cufftHandle *plan, int nx, int ny, cufftType type, size_t *workSize)
</pre><p class="p">This call gives a more accurate estimate of the work area size required for a plan than <samp class="ph codeph">cufftEstimate2d()</samp>, given the specified parameters, and taking into account any plan settings that may have been made.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">x</dfn> dimension (number of rows)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ny</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">y</dfn> dimension (number of columns)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_C2R</samp> for single precision complex to real)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully returned the size of the work space.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Either or both of the <samp class="ph codeph">nx</samp> or <samp class="ph codeph">ny</samp> parameters is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftgetsize3d"><a name="function-cufftgetsize3d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftgetsize3d" name="function-cufftgetsize3d" shape="rect">3.5.3.&nbsp;Function cufftGetSize3d()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftGetSize3d(cufftHandle *plan, int nx, int ny, int nz, cufftType type, size_t *workSize)
</pre><p class="p">This call gives a more accurate estimate of the work area size required for a plan than <samp class="ph codeph">cufftEstimate3d()</samp>, given the specified parameters, and taking into account any plan settings that may have been made.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nx</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">x</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ny</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">y</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">nz</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform size in the <dfn class="term">z</dfn> dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_R2C</samp> for single precision real to complex)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully returned the size of the work space.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more of the <samp class="ph codeph">nx</samp>, <samp class="ph codeph">ny</samp>, or <samp class="ph codeph">nz</samp> parameters is not a supported size.
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftgetsizemany"><a name="function-cufftgetsizemany" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftgetsizemany" name="function-cufftgetsizemany" shape="rect">3.5.4.&nbsp;Function cufftGetSizeMany()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftGetSizeMany(cufftHandle *plan, int rank, int *n, int *inembed,
        int istride, int idist, int *onembed, int ostride,
        int odist, cufftType type, int batch, size_t *workSize);
</pre><p class="p">This call gives a more accurate estimate of the work area size required for a plan than <samp class="ph codeph">cufftEstimateSizeMany()</samp>, given the specified parameters, and taking into account any plan settings that may have been made.
                     </p>
                     <p class="p">The <samp class="ph codeph">batch</samp> input parameter tells CUFFT how many transforms to configure. With this function, batched plans of 1, 2, or 3 dimensions
                        may be created.
                     </p>
                     <p class="p">The <samp class="ph codeph">cufftPlanMany()</samp> API supports more complicated input and output data layouts via the advanced data layout parameters: <samp class="ph codeph">inembed</samp>, <samp class="ph codeph">istride</samp>, <samp class="ph codeph">idist</samp>, <samp class="ph codeph">onembed</samp>, <samp class="ph codeph">ostride</samp>, and <samp class="ph codeph">odist</samp>.
                     </p>
                     <p class="p">All arrays are assumed to be in CPU memory.</p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">rank</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Dimensionality of the transform (1, 2, or 3)</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">n</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Array of size <samp class="ph codeph">rank</samp>, describing the size of each dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">inembed</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer of size <samp class="ph codeph">rank</samp> that indicates the storage dimensions of the input data in memory. If set to NULL all other advanced data layout parameters
                                    are ignored.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">istride</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">idist</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between the first element of two consecutive signals in a batch of the input data</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">onembed</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer of size <samp class="ph codeph">rank</samp> that indicates the storage dimensions of the output data in memory. If set to NULL all other advanced data layout parameters
                                    are ignored.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">ostride</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost)
                                    dimension
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">odist</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Indicates the distance between the first element of two consecutive signals in a batch of the output data</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">type</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform data type (e.g., <samp class="ph codeph">CUFFT_R2C</samp> for single precision real to complex)
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">batch</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Batch size for this transform</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains a CUFFT plan handle</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully returned the size of the work space.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_ALLOC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The allocation of GPU resources for the plan failed.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more invalid parameters were passed to the API.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_SIZE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">One or more of the parameters is not a supported size.</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="function-cufftgetsize"><a name="function-cufftgetsize" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftgetsize" name="function-cufftgetsize" shape="rect">3.6.&nbsp;Function cufftGetSize()</a></h3>
               <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftGetSize(cufftHandle *plan, size_t *workSize);
</pre><p class="p">Once plan generation has been done, either with the original API or the extensible API, this call returns the actual size
                     of the work area required to support the plan. Callers who choose to manage work area allocation within their application
                     must use this call after plan generation, and after any <samp class="ph codeph">cufftSet*()</samp> calls subsequent to plan generation, if those calls might alter the required work space size.
                  </p>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                              </td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">*workSize</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the size of the work space</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully returned the size of the work space.</td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                              </td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="unique_316245821"><a name="unique_316245821" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#unique_316245821" name="unique_316245821" shape="rect">CUFFT Caller Allocated Work Area Support</a></h3>
               <div class="body conbody"></div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftsetautoallocation"><a name="function-cufftsetautoallocation" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftsetautoallocation" name="function-cufftsetautoallocation" shape="rect">3.7.1.&nbsp;Function cufftSetAutoAllocation()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftSetAutoAllocation(cufftHandle *plan, bool autoAllocate);
</pre><p class="p"><samp class="ph codeph">cufftSetAutoAllocation()</samp> indicates that the caller intends to allocate and manage work areas for plans that have been generated. CUFFT default behavior
                        is to allocate the work area at plan generation time. If <samp class="ph codeph">cufftSetAutoAllocation()</samp> has been called with autoAllocate set to "false" prior to one of the <samp class="ph codeph">cufftMakePlan*()</samp> calls, CUFFT does not allocate the work area. This is the preferred sequence for callers wishing to manage work area allocation.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">autoAllocate</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Boolean to indicate whether to allocate work area.</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully allows user to manage work area.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftsetworkarea"><a name="function-cufftsetworkarea" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftsetworkarea" name="function-cufftsetworkarea" shape="rect">3.7.2.&nbsp;Function cufftSetWorkArea()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftSetWorkArea(cufftHandle *plan, void *workArea);
</pre><p class="p"><samp class="ph codeph">cufftSetWorkArea()</samp> overrides the work area pointer associated with a plan. If the work area was auto-allocated, CUFFT frees the auto-allocated
                        space. The <samp class="ph codeph">cufftExecute*()</samp> calls assume that the work area pointer is valid and that it points to a contiguous region in device memory that does not
                        overlap with any other work area. If this is not the case, results are indeterminate.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to a <samp class="ph codeph">cufftHandle</samp> object
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">workArea</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to workArea</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">workArea</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to workArea</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully allows user to override workArea pointer.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="function-cufftdestroy"><a name="function-cufftdestroy" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftdestroy" name="function-cufftdestroy" shape="rect">3.8.&nbsp;Function cufftDestroy()</a></h3>
               <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftDestroy(cufftHandle plan)
</pre><p class="p">Frees all GPU resources associated with a CUFFT plan and destroys the internal plan data structure. This function should be
                     called once a plan is no longer needed, to avoid wasting GPU memory.
                  </p>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">cufftHandle</samp> object of the plan to be destroyed.
                              </td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully destroyed the FFT plan.</td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                              </td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="plan-execution"><a name="plan-execution" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#plan-execution" name="plan-execution" shape="rect">3.9.&nbsp;CUFFT Execution</a></h3>
               <div class="body conbody"></div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftexecc2c-cufftexecz2z"><a name="function-cufftexecc2c-cufftexecz2z" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftexecc2c-cufftexecz2z" name="function-cufftexecc2c-cufftexecz2z" shape="rect">3.9.1.&nbsp;Functions cufftExecC2C() and cufftExecZ2Z()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftExecC2C(cufftHandle *plan, cufftComplex *idata, 
        cufftComplex *odata, int direction);
cufftResult 
    cufftExecZ2Z(cufftHandle *plan, cufftDoubleComplex *idata, 
        cufftDoubleComplex *odata, int direction);
</pre><p class="p"><samp class="ph codeph">cufftExecC2C()</samp> (<samp class="ph codeph">cufftExecZ2Z()</samp>) executes a single-precision (double-precision) complex-to-complex transform plan in the transform direction as specified
                        by <samp class="ph codeph">direction</samp> parameter. CUFFT uses the GPU memory pointed to by the <samp class="ph codeph">idata</samp> parameter as input data. This function stores the Fourier coefficients in the <samp class="ph codeph">odata</samp> array. If <samp class="ph codeph">idata</samp> and <samp class="ph codeph">odata</samp> are the same, this method does an in-place transform.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">cufftHandle</samp> object for the plan to be executed
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">idata</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the complex input data (in GPU memory) to transform</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">odata</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the complex output data (in GPU memory)</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">direction</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The transform direction: <samp class="ph codeph">CUFFT_FORWARD</samp> or <samp class="ph codeph">CUFFT_INVERSE</samp></td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">odata</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains the complex Fourier coefficients</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully executed the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">At least one of the parameters <samp class="ph codeph">idata</samp>, <samp class="ph codeph">odata</samp>, and <samp class="ph codeph">direction</samp> is not valid.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_EXEC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT failed to execute the transform on the GPU.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftexecr2c-cufftexecd2z"><a name="function-cufftexecr2c-cufftexecd2z" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftexecr2c-cufftexecd2z" name="function-cufftexecr2c-cufftexecd2z" shape="rect">3.9.2.&nbsp;Functions cufftExecR2C() and cufftExecD2Z()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftExecR2C(cufftHandle *plan, cufftReal *idata, cufftComplex *odata);
cufftResult 
    cufftExecD2Z(cufftHandle *plan, cufftDoubleReal *idata, cufftDoubleComplex *odata);
</pre><p class="p"><samp class="ph codeph">cufftExecR2C()</samp> (<samp class="ph codeph">cufftExecD2Z()</samp>) executes a single-precision (double-precision) real-to-complex, implicitly forward, CUFFT transform plan. CUFFT uses as
                        input data the GPU memory pointed to by the <samp class="ph codeph">idata</samp> parameter. This function stores the nonredundant Fourier coefficients in the <samp class="ph codeph">odata</samp> array. Pointers to <samp class="ph codeph">idata</samp> and <samp class="ph codeph">odata</samp> are both required to be aligned to <samp class="ph codeph">cufftComplex</samp> data type in single-precision transforms and <samp class="ph codeph">cufftDoubleComplex</samp> data type in double-precision transforms. If <samp class="ph codeph">idata</samp> and <samp class="ph codeph">odata</samp> are the same, this method does an in-place transform. Note the data layout differences between in-place and out-of-place
                        transforms as described in <a class="xref" href="index.html#cufft-transform-types" shape="rect">Parameter cufftType</a>.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">cufftHandle</samp> object for the plan to be executed
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">idata</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the real input data (in GPU memory) to transform</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">odata</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the real output data (in GPU memory)</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">odata</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains the complex Fourier coefficients</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully executed the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">At least one of the parameters <samp class="ph codeph">idata</samp> and <samp class="ph codeph">odata</samp> is not valid.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_EXEC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT failed to execute the transform on the GPU.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="function-cufftexecc2r-cufftexecz2d"><a name="function-cufftexecc2r-cufftexecz2d" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftexecc2r-cufftexecz2d" name="function-cufftexecc2r-cufftexecz2d" shape="rect">3.9.3.&nbsp;Functions cufftExecC2R() and cufftExecZ2D()</a></h3>
                  <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftExecC2R(cufftHandle plan, cufftComplex *idata, cufftReal *odata);
cufftResult 
    cufftExecZ2D(cufftHandle plan, cufftComplex *idata, cufftReal *odata);
</pre><p class="p"><samp class="ph codeph">cufftExecC2R()</samp> (<samp class="ph codeph">cufftExecZ2D()</samp>) executes a single-precision (double-precision) complex-to-real, implicitly inverse, CUFFT transform plan. CUFFT uses as
                        input data the GPU memory pointed to by the <samp class="ph codeph">idata</samp> parameter. The input array holds only the nonredundant complex Fourier coefficients. This function stores the real output
                        values in the <samp class="ph codeph">odata</samp> array. and pointers are both required to be aligned to <samp class="ph codeph">cufftComplex</samp> data type in single-precision transforms and <samp class="ph codeph">cufftDoubleComplex</samp> type in double-precision transforms. If <samp class="ph codeph">idata</samp> and <samp class="ph codeph">odata</samp> are the same, this method does an in-place transform.
                     </p>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">cufftHandle</samp> object for the plan to be executed
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">idata</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the complex input data (in GPU memory) to transform</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">odata</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the complex output data (in GPU memory)</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">odata</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Contains the complex Fourier coefficients</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                     <div class="tablenoborder">
                        <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully executed the FFT plan.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_VALUE</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">At least one of the parameters <samp class="ph codeph">idata</samp> and <samp class="ph codeph">odata</samp> is not valid.
                                 </td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INTERNAL_ERROR</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">An internal driver error was detected.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_EXEC_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT failed to execute the transform on the GPU.</td>
                              </tr>
                              <tr class="row">
                                 <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                                 <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="function-cufftsetstream"><a name="function-cufftsetstream" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftsetstream" name="function-cufftsetstream" shape="rect">3.10.&nbsp;Function cufftSetStream()</a></h3>
               <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftSetStream(cufftHandle plan, cudaStream_t stream);
</pre><p class="p">Associates a CUDA stream with a CUFFT plan. All kernel launches made during plan execution are now done through the associated
                     stream, enabling overlap with activity in other streams (e.g. data copying). The association remains until the plan is destroyed
                     or the stream is changed with another call to <samp class="ph codeph">cufftSetStream()</samp>.
                  </p>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">cufftHandle</samp> object to associate with the stream
                              </td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">stream</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">A valid CUDA stream created with <samp class="ph codeph">cudaStreamCreate()</samp>; <samp class="ph codeph">0</samp> for the default stream
                              </td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Status Returned</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The stream was associated with the plan.</td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                              </td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="function-cufftgetversion"><a name="function-cufftgetversion" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftgetversion" name="function-cufftgetversion" shape="rect">3.11.&nbsp;Function cufftGetVersion()</a></h3>
               <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftGetVersion(int *version);
</pre><p class="p">Returns the version number of CUFFT.</p>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">input</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the version number</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Output</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">output</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">Pointer to the version number</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully returned the version number.</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="function-cufftsetcompatibilitymode"><a name="function-cufftsetcompatibilitymode" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#function-cufftsetcompatibilitymode" name="function-cufftsetcompatibilitymode" shape="rect">3.12.&nbsp;Function cufftSetCompatibilityMode()</a></h3>
               <div class="body conbody"><pre xml:space="preserve">
cufftResult 
    cufftSetCompatibilityMode(cufftHandle plan, cufftCompatibility mode);
</pre><p class="p">Configures the layout of CUFFT output in FFTW-compatible modes. When desired, FFTW compatibility can be configured for padding
                     only, for asymmetric complex inputs only, or for full compatibility. If the <samp class="ph codeph">cufftSetCompatibilityMode()</samp> API fails, later <samp class="ph codeph">cufftExecute*()</samp> calls are not guaranteed to work.
                  </p>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Input</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">plan</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">cufftHandle</samp> object to associate with the stream
                              </td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">mode</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">
                                 <p class="p">The <samp class="ph codeph">cufftCompatibility</samp> option to be used:
                                 </p>
                                 <p class="p"><samp class="ph codeph">CUFFT_COMPATIBILITY_NATIVE</samp><samp class="ph codeph">CUFFT_COMPATIBILITY_FFTW_PADDING</samp> (default)   
                                    <samp class="ph codeph">CUFFT_COMPATIBILITY_FFTW_ASYMMETRIC</samp><samp class="ph codeph">CUFFT_COMPATIBILITY_FFTW_ALL</samp></p>
                              </td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
                  <div class="tablenoborder">
                     <table cellpadding="4" cellspacing="0" summary="" class="table" width="100%" frame="border" border="1" rules="all"><span class="desc tabledesc"><strong class="ph b">Return Values</strong></span><tbody class="tbody">
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SUCCESS</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">CUFFT successfully set compatibiltiy mode.</td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_INVALID_PLAN</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The <samp class="ph codeph">plan</samp> parameter is not a valid handle.
                              </td>
                           </tr>
                           <tr class="row">
                              <td class="entry" valign="top" width="40%" rowspan="1" colspan="1"><samp class="ph codeph">CUFFT_SETUP_FAILED</samp></td>
                              <td class="entry" valign="top" width="60%" rowspan="1" colspan="1">The CUFFT library failed to initialize.</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="cufftcompatibility"><a name="cufftcompatibility" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#cufftcompatibility" name="cufftcompatibility" shape="rect">3.13.&nbsp;Parameter cufftCompatibility</a></h3>
               <div class="body conbody">
                  <p class="p">CUFFT Library defines FFTW compatible data layouts using the following enumeration of values. See <a class="xref" href="index.html#fftw-compatibility-mode" shape="rect">FFTW Compatibility Mode</a> for more details.
                  </p><pre xml:space="preserve">
typedef enum cufftCompatibility_t {
    // Compact data in native format (highest performance)
    CUFFT_COMPATIBILITY_NATIVE          = 0, 
    
    // FFTW-compatible alignment (the default value)
    CUFFT_COMPATIBILITY_FFTW_PADDING    = 1, 
    
    // Waives the C2R symmetry requirement input 
    CUFFT_COMPATIBILITY_FFTW_ASYMMETRIC = 2,    
    
    CUFFT_COMPATIBILITY_FFTW_ALL = CUFFT_COMPATIBILITY_FFTW_PADDING | CUFFT_COMPATIBILITY_FFTW_ASYMMETRIC
} cufftCompatibility;
</pre></div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="cufft-types"><a name="cufft-types" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#cufft-types" name="cufft-types" shape="rect">3.14.&nbsp;CUFFT Types</a></h3>
               <div class="body conbody"></div>
               <div class="topic concept nested2" xml:lang="en-us" id="cufft-transform-types"><a name="cufft-transform-types" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#cufft-transform-types" name="cufft-transform-types" shape="rect">3.14.1.&nbsp;Parameter cufftType</a></h3>
                  <div class="body conbody">
                     <p class="p">The CUFFT library supports complex- and real-data transforms. The <samp class="ph codeph">cufftType</samp> data type is an enumeration of the types of transform data supported by CUFFT.
                     </p><pre xml:space="preserve">
typedef enum cufftType_t {
    CUFFT_R2C = 0x2a,  // Real to complex (interleaved) 
    CUFFT_C2R = 0x2c,  // Complex (interleaved) to real 
    CUFFT_C2C = 0x29,  // Complex to complex (interleaved) 
    CUFFT_D2Z = 0x6a,  // Double to double-complex (interleaved) 
    CUFFT_Z2D = 0x6c,  // Double-complex (interleaved) to double 
    CUFFT_Z2Z = 0x69   // Double-complex to double-complex (interleaved)
} cufftType;
</pre></div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="cufft-transform-directions"><a name="cufft-transform-directions" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#cufft-transform-directions" name="cufft-transform-directions" shape="rect">3.14.2.&nbsp;Parameters for Transform Direction</a></h3>
                  <div class="body conbody">
                     <p class="p">The CUFFT library defines forward and inverse Fast Fourier Transforms according to the sign of the complex exponential term.</p><pre xml:space="preserve">
    #define CUFFTFORWARD -1
    #define CUFFTINVERSE 1
</pre><p class="p">CUFFT performs un-normalized FFTs; that is, performing a forward FFT on an input data set followed by an inverse FFT on the
                        resulting set yields data that is equal to the input, scaled by the number of elements. Scaling either transform by the reciprocal
                        of the size of the data set is left for the user to perform as seen fit.
                     </p>
                  </div>
               </div>
               <div class="topic concept nested2" xml:lang="en-us" id="cufft-types-others"><a name="cufft-types-others" shape="rect">
                     <!-- --></a><h3 class="title topictitle2"><a href="#cufft-types-others" name="cufft-types-others" shape="rect">3.14.3.&nbsp;Other CUFFT Types</a></h3>
                  <div class="body conbody"></div>
                  <div class="topic concept nested3" xml:lang="en-us" id="cuffthandle"><a name="cuffthandle" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#cuffthandle" name="cuffthandle" shape="rect">3.14.3.1.&nbsp;cufftHandle</a></h3>
                     <div class="body conbody">
                        <p class="p">A handle type used to store and access CUFFT plans. The user receives a handle after creating a CUFFT plan and uses this handle
                           to execute the plan.
                        </p><pre xml:space="preserve">typedef unsigned int cufftHandle;</pre></div>
                  </div>
                  <div class="topic concept nested3" xml:lang="en-us" id="cufftreal"><a name="cufftreal" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#cufftreal" name="cufftreal" shape="rect">3.14.3.2.&nbsp;cufftReal</a></h3>
                     <div class="body conbody">
                        <p class="p">A single-precision, floating-point real data type.</p><pre xml:space="preserve">typedef float cufftReal;</pre></div>
                  </div>
                  <div class="topic concept nested3" xml:lang="en-us" id="cufftdoublereal"><a name="cufftdoublereal" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#cufftdoublereal" name="cufftdoublereal" shape="rect">3.14.3.3.&nbsp;cufftDoubleReal</a></h3>
                     <div class="body conbody">
                        <p class="p">A double-precision, floating-point real data type.</p><pre xml:space="preserve">typedef double cufftDoubleReal;</pre></div>
                  </div>
                  <div class="topic concept nested3" xml:lang="en-us" id="cufftcomplex"><a name="cufftcomplex" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#cufftcomplex" name="cufftcomplex" shape="rect">3.14.3.4.&nbsp;cufftComplex</a></h3>
                     <div class="body conbody">
                        <p class="p">A single-precision, floating-point complex data type that consists of interleaved real and imaginary components.</p><pre xml:space="preserve">typedef cuComplex cufftComplex;</pre></div>
                  </div>
                  <div class="topic concept nested3" xml:lang="en-us" id="cufftdoublecomplex"><a name="cufftdoublecomplex" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#cufftdoublecomplex" name="cufftdoublecomplex" shape="rect">3.14.3.5.&nbsp;cufftDoubleComplex</a></h3>
                     <div class="body conbody">
                        <p class="p">A double-precision, floating-point complex data type that consists of interleaved real and imaginary components.</p><pre xml:space="preserve">typedef cuDoubleComplex cufftDoubleComplex;</pre></div>
                  </div>
               </div>
            </div>
         </div>
         <div class="topic concept nested0" xml:lang="en-us" id="cufft-code-examples"><a name="cufft-code-examples" shape="rect">
               <!-- --></a><h2 class="title topictitle1"><a href="#cufft-code-examples" name="cufft-code-examples" shape="rect">4.&nbsp;CUFFT Code Examples</a></h2>
            <div class="body conbody">
               <p class="p">This chapter provides six simple examples of complex and real 1D, 2D, and 3D transforms that use CUFFT to perform forward
                  and inverse FFTs.
               </p>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="oned-complex-to-complex-transforms"><a name="oned-complex-to-complex-transforms" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#oned-complex-to-complex-transforms" name="oned-complex-to-complex-transforms" shape="rect">1D Complex-to-Complex Transforms</a></h3>
               <div class="body conbody">
                  <p class="p">In this example a one-dimensional complex-to-complex transform is applied to the input data. Afterwards an inverse transform
                     is performed on the computed frequency domain representation.
                  </p><pre xml:space="preserve">
#define NX 256
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define BATCH 10</span>

cufftHandle plan;
cufftComplex *data;
cudaMalloc((<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)&amp;data, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cufftComplex)*NX*BATCH);
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cudaGetLastError() != cudaSuccess){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Cuda error: Failed to allocate\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftPlan1d(&amp;plan, NX, CUFFT_C2C, BATCH) != CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT error: Plan creation failed"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}	

...

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">/* Note:
 *  Identical pointers to input and output arrays implies in-place transformation
 */</span>

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftExecC2C(plan, data, data, CUFFT_FORWARD) != CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT error: ExecC2C Forward failed"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftExecC2C(plan, data, data, CUFFT_INVERSE) != CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT error: ExecC2C Inverse failed"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">/* 
 *  Divide by number of elements in data set to get back original data
 */</span>

...

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cudaThreadSynchronize() != cudaSuccess){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Cuda error: Failed to synchronize\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}	

...
	
cufftDestroy(plan);
cudaFree(data);

</pre></div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="oned-real-to-complex-transforms"><a name="oned-real-to-complex-transforms" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#oned-real-to-complex-transforms" name="oned-real-to-complex-transforms" shape="rect">1D Real-to-Complex Transforms</a></h3>
               <div class="body conbody">
                  <p class="p">In this example a one-dimensional real-to-complex transform is applied to the input data. </p><pre xml:space="preserve">
#define NX 256
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define BATCH 10</span>

cufftHandle plan;
cufftComplex *data;
cudaMalloc((<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)&amp;data, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cufftComplex)*(NX/2+1)*BATCH);
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cudaGetLastError() != cudaSuccess){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Cuda error: Failed to allocate\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftPlan1d(&amp;plan, NX, CUFFT_R2C, BATCH) != CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT error: Plan creation failed"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}	

...

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">/* Use the CUFFT plan to transform the signal in place. */</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftExecR2C(plan, (cufftReal*)data, data) != CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT error: ExecC2C Forward failed"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cudaThreadSynchronize() != cudaSuccess){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Cuda error: Failed to synchronize\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

...

cufftDestroy(plan);
cudaFree(data);

</pre></div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="twod-complex-to-real-transforms"><a name="twod-complex-to-real-transforms" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#twod-complex-to-real-transforms" name="twod-complex-to-real-transforms" shape="rect">2D Complex-to-Real Transforms</a></h3>
               <div class="body conbody">
                  <p class="p">In this example a two-dimensional complex-to-real transform is applied to the input data arranged according to the requirements
                     of the native compatibility mode.
                  </p><pre xml:space="preserve">
#define NX 256
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define NY 128</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define NRANK 2</span>

cufftHandle plan;
cufftComplex *data;
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> n[NRANK] = {NX, NY};

cudaMalloc((<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)&amp;data, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cufftComplex)*NX*(NY/2+1));
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cudaGetLastError() != cudaSuccess){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Cuda error: Failed to allocate\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">/* Create a 2D FFT plan. */</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftPlanMany(&amp;plan, NRANK, n,
				  NULL, 1, 0,
				  NULL, 1, 0,
				  CUFFT_C2R,BATCH) != CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT Error: Unable to create plan\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftSetCompatibilityMode(plan, CUFFT_COMPATIBILITY_NATIVE)!= CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT Error: Unable to set compatibility mode to native\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;		
}

...

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftExecC2R(plan, data, data) != CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT Error: Unable to execute plan\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;		
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cudaThreadSynchronize() != cudaSuccess){
  	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Cuda error: Failed to synchronize\n"</span>);
   	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;
}	

...

cufftDestroy(plan);
cudaFree(data);

</pre></div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="threed-complex-to-complex-transforms"><a name="threed-complex-to-complex-transforms" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#threed-complex-to-complex-transforms" name="threed-complex-to-complex-transforms" shape="rect">3D Complex-to-Complex Transforms</a></h3>
               <div class="body conbody">
                  <p class="p">In this example a three-dimensional complex-to-complex transform is applied to the input data.</p><pre xml:space="preserve">
#define NX 64
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define NY 128</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define NX 128</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define BATCH 10</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define NRANK 3</span>

cufftHandle plan;
cufftComplex *data;
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> n[NRANK] = {NX, NY, NZ};

cudaMalloc((<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span>**)&amp;data, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cufftComplex)*NX*NY*NZ*BATCH);
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cudaGetLastError() != cudaSuccess){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Cuda error: Failed to allocate\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">/* Create a 3D FFT plan. */</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftPlanMany(&amp;plan, NRANK, n, 
				  NULL, 1, NX*NY*NZ, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// *inembed, istride, idist </span>
				  NULL, 1, NX*NY*NZ, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">// *onembed, ostride, odist</span>
				  CUFFT_C2C, BATCH) != CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT error: Plan creation failed"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}	

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">/* Use the CUFFT plan to transform the signal in place. */</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftExecC2C(plan, data, data, CUFFT_FORWARD) != CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT error: ExecC2C Forward failed"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cudaThreadSynchronize() != cudaSuccess){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Cuda error: Failed to synchronize\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}	

...
	
cufftDestroy(plan);
cudaFree(data);

</pre></div>
            </div>
            <div class="topic concept nested1" xml:lang="en-us" id="twod-advanced-data-layout-use"><a name="twod-advanced-data-layout-use" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#twod-advanced-data-layout-use" name="twod-advanced-data-layout-use" shape="rect">2D Advanced Data Layout Use</a></h3>
               <div class="body conbody">
                  <p class="p">In this example a two-dimensional complex-to-complex transform is applied to the input data arranged according to the requirements
                     the advanced layout.
                  </p><pre xml:space="preserve">
#define NX 128
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define NY 256</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define BATCH 10</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define NRANK 2</span>

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">/* Advanced interface parameters, arbitrary strides */</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define ISTRIDE 2</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define OSTRIDE 1</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define IX (NX+2)</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define IY (NY+1)</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define OX (NX+3)</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define OY (NY+4)</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define IDIST (IX*IY*ISTRIDE+3)</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-directive">#define ODIST (OX*OY*OSTRIDE+5) </span>

cufftHandle plan;
cufftComplex *idata, *odata;
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> isize = IDIST * BATCH;
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> osize = ODIST * BATCH;
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> n[NRANK] = {NX, NY};
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> inembed[NRANK] = {IX, IY};
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">int</span> onembed[NRANK] = {OX, OY};

cudaMalloc((<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> **)&amp;idata, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cufftComplex)*isize);
cudaMalloc((<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">void</span> **)&amp;odata, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">sizeof</span>(cufftComplex)*osize);
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cudaGetLastError() != cudaSuccess){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Cuda error: Failed to allocate\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">/* Create a batched 2D plan */</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftPlanMany(&amp;plan, NRANK, n,
				  inembed,ISTRIDE,IDIST,
				  onembed,OSTRIDE,ODIST,
				  CUFFT_C2C,BATCH) != CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT Error: Unable to create plan\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;	
}

...

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-comment">/* Execute the transform out-of-place */</span>
<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cufftExecC2C(plan, idata, odata, CUFFT_FORWARD) != CUFFT_SUCCESS){
	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"CUFFT Error: Failed to execute plan\n"</span>);
	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;		
}

<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">if</span> (cudaThreadSynchronize() != cudaSuccess){
  	fprintf(stderr, <span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-string">"Cuda error: Failed to synchronize\n"</span>);
   	<span xmlns:xslthl="http://xslthl.sf.net" class="xslthl-keyword">return</span>;
}

...

cufftDestroy(plan);
cudaFree(idata);
cudaFree(odata);

</pre></div>
            </div>
         </div>
         <div class="topic concept nested0" xml:lang="en-us" id="fftw-conversion-guide"><a name="fftw-conversion-guide" shape="rect">
               <!-- --></a><h2 class="title topictitle1"><a href="#fftw-conversion-guide" name="fftw-conversion-guide" shape="rect">5.&nbsp;FFTW Conversion Guide</a></h2>
            <div class="body conbody">
               <p class="p">CUFFT differs from FFTW in that FFTW has many plans and a single execute function while CUFFT has fewer plans, but multiple
                  execute functions. The CUFFT execute functions determine the precision (single or double) and whether the input is complex
                  or real valued. The following table shows the relationship between the two interfaces.
               </p>
               <div class="tablenoborder"><a name="fftw-conversion-guide__table_5_1" shape="rect">
                     <!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="fftw-conversion-guide__table_5_1" class="table" frame="border" border="1" rules="all">
                     <thead class="thead" align="left">
                        <tr class="row">
                           <th class="entry" valign="top" width="60%" id="d54e9582" rowspan="1" colspan="1">FFTW function</th>
                           <th class="entry" valign="top" width="40%" id="d54e9585" rowspan="1" colspan="1">CUFFT function</th>
                        </tr>
                     </thead>
                     <tbody class="tbody">
                        <tr class="row">
                           <td class="entry" valign="top" width="60%" headers="d54e9582" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_dft_1d(), fftw_plan_dft_r2c_1d(), fftw_plan_dft_c2r_1d()</samp></td>
                           <td class="entry" valign="top" width="40%" headers="d54e9585" rowspan="1" colspan="1"><samp class="ph codeph">cufftPlan1d()</samp></td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="60%" headers="d54e9582" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_dft_2d(), fftw_plan_dft_r2c_2d(), fftw_plan_dft_c2r_2d()</samp></td>
                           <td class="entry" valign="top" width="40%" headers="d54e9585" rowspan="1" colspan="1"><samp class="ph codeph">cufftPlan2d()</samp></td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="60%" headers="d54e9582" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_dft_3d(), fftw_plan_dft_r2c_3d(), fftw_plan_dft_c2r_3d()</samp></td>
                           <td class="entry" valign="top" width="40%" headers="d54e9585" rowspan="1" colspan="1"><samp class="ph codeph">cufftPlan3d()</samp></td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="60%" headers="d54e9582" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_dft(), fftw_plan_dft_r2c(), fftw_plan_dft_c2r()</samp></td>
                           <td class="entry" valign="top" width="40%" headers="d54e9585" rowspan="1" colspan="1"><samp class="ph codeph">cufftPlanMany()</samp></td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="60%" headers="d54e9582" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_many_dft(), fftw_plan_many_dft_r2c(), fftw_plan_many_dft_c2r()</samp></td>
                           <td class="entry" valign="top" width="40%" headers="d54e9585" rowspan="1" colspan="1"><samp class="ph codeph">cufftPlanMany()</samp></td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="60%" headers="d54e9582" rowspan="1" colspan="1"><samp class="ph codeph">fftw_execute()</samp></td>
                           <td class="entry" valign="top" width="40%" headers="d54e9585" rowspan="1" colspan="1"><samp class="ph codeph">cufftExecC2C(), cufftExecZ2Z(), cufftExecR2C(), cufftExecD2Z(), cufftExecC2R(), cufftExecZ2D()</samp></td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="60%" headers="d54e9582" rowspan="1" colspan="1"><samp class="ph codeph">fftw_destroy_plan()</samp></td>
                           <td class="entry" valign="top" width="40%" headers="d54e9585" rowspan="1" colspan="1"><samp class="ph codeph">cufftDestroy()</samp></td>
                        </tr>
                     </tbody>
                  </table>
               </div>
            </div>
         </div>
         <div class="topic concept nested0" xml:lang="en-us" id="fftw-supported-interface"><a name="fftw-supported-interface" shape="rect">
               <!-- --></a><h2 class="title topictitle1"><a href="#fftw-supported-interface" name="fftw-supported-interface" shape="rect">6.&nbsp;FFTW Interface to CUFFT 
                  </a></h2>
            <div class="body conbody">
               <p class="p">NVIDIA provides FFTW3 interfaces to the CUFFT library. This allows applications using FFTW to use NVIDIA GPUs with minimal
                  modifications to program source code. To use the interface first do the following two steps
               </p>
               <ul class="ul">
                  <li class="li">It is recommended that you replace the include file <samp class="ph codeph">fftw3.h</samp> with <samp class="ph codeph">cufftw.h</samp></li>
                  <li class="li">Instead of linking with the double/single precision libraries such as <samp class="ph codeph">fftw3/fftw3f</samp> libraries, link with both the CUFFT and CUFFTW libraries
                  </li>
               </ul>
               <p class="p">
                  After an application is working using the FFTW3 interface, users may want to modify their code to move data to and from the
                  GPU and use the routines documented in the <a class="xref" href="index.html#fftw-conversion-guide" shape="rect">FFTW Conversion Guide</a> for the best performance.
                  
               </p>
               <p class="p">
                  The following tables show which components and functions of FFTW3 are supported in CUFFT.
                  
               </p>
               <div class="tablenoborder"><a name="fftw-supported-interface__table_6_1" shape="rect">
                     <!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="fftw-supported-interface__table_6_1" class="table" frame="border" border="1" rules="all">
                     <thead class="thead" align="left">
                        <tr class="row">
                           <th class="entry" valign="top" width="25%" id="d54e9725" rowspan="1" colspan="1">Section in FFTW manual</th>
                           <th class="entry" valign="top" width="37.5%" id="d54e9728" rowspan="1" colspan="1">Supported</th>
                           <th class="entry" valign="top" width="37.5%" id="d54e9731" rowspan="1" colspan="1"> Unsupported</th>
                        </tr>
                     </thead>
                     <tbody class="tbody">
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9725" rowspan="1" colspan="1">Complex numbers</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9728" rowspan="1" colspan="1"><samp class="ph codeph">fftw_complex, fftwf_complex</samp> types
                           </td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9731" rowspan="1" colspan="1">&nbsp;</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9725" rowspan="1" colspan="1">Precision</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9728" rowspan="1" colspan="1">double <samp class="ph codeph">fftw3</samp>, single <samp class="ph codeph">fftwf3</samp></td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9731" rowspan="1" colspan="1">long double <samp class="ph codeph">fftw3l</samp>, quad precision <samp class="ph codeph">fftw3q</samp> are not supported since CUDA functions operate on double and single precision floating-point quantities
                           </td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9725" rowspan="1" colspan="1">Memory Allocation</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9728" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9731" rowspan="1" colspan="1"><samp class="ph codeph">fftw_malloc(), fftw_free(), fftw_alloc_real(), fftw_alloc_complex(), fftwf_alloc_real(), fftwf_alloc_complex()</samp></td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9725" rowspan="1" colspan="1">Multi-threaded FFTW</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9728" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9731" rowspan="1" colspan="1"><samp class="ph codeph">fftw3_threads, fftw3_omp</samp> are not supported - note that CUFFT is already multithreaded
                           </td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9725" rowspan="1" colspan="1">Distributed-memory FFTW with MPI</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9728" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9731" rowspan="1" colspan="1"><samp class="ph codeph">fftw3_mpi,fftw3f_mpi</samp> are not supported
                           </td>
                        </tr>
                     </tbody>
                  </table>
               </div>
               <p class="p"></p>
               <p class="p">Note that for each of the double precision functions below there is a corresponding single precision version with the letters
                  <samp class="ph codeph">fftw</samp> replaced by <samp class="ph codeph">fftwf</samp>.
               </p>
               <p class="p"></p>
               <div class="tablenoborder"><a name="fftw-supported-interface__table_6_2" shape="rect">
                     <!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="fftw-supported-interface__table_6_2" class="table" frame="border" border="1" rules="all">
                     <thead class="thead" align="left">
                        <tr class="row">
                           <th class="entry" valign="top" width="25%" id="d54e9843" rowspan="1" colspan="1">Section in FFTW manual</th>
                           <th class="entry" valign="top" width="37.5%" id="d54e9846" rowspan="1" colspan="1">Supported</th>
                           <th class="entry" valign="top" width="37.5%" id="d54e9849" rowspan="1" colspan="1">Unsupported</th>
                        </tr>
                     </thead>
                     <tbody class="tbody">
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Using Plans</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1"><samp class="ph codeph">fftw_execute(), fftw_destroy_plan(), fftw_cleanup(), fftw_print_plan()</samp></td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1"><samp class="ph codeph">fftw_cost(), fftw_flops()</samp> exist but are not functional
                           </td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1"><strong class="ph b">Basic Interface</strong></td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">&nbsp;</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Complex DFTs</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_dft_1d(), fftw_plan_dft_2d(), fftw_plan_dft_3d(), fftw_plan_dft()</samp></td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">&nbsp;</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Planner Flags</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">Planner flags are ignored and the same plan is returned regardless</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Real-data DFTs</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_dft_r2c_1d(), fftw_plan_dft_r2c_2d(), fftw_plan_dft_r2c_3d(), fftw_plan_dft_r2c(), fftw_plan_dft_c2r_1d(), fftw_plan_dft_c2r_2d(),
                                 fftw_plan_dft_c2r_3d(), fftw_plan_dft_c2r()</samp></td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">&nbsp;</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Read-data DFT Array Format</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">Not supported</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Read-to-Real Transform</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">Not supported</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Read-to-Real Transform Kinds</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">Not supported</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1"><strong class="ph b">Advanced Interface</strong></td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">&nbsp;</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Advanced Complex DFTs</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_many_dft()</samp> with multiple 1D, 2D, 3D transforms
                           </td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_many_dft()</samp> with 4D or higher transforms or a 2D or higher batch of embedded transforms
                           </td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Advanced Real-data DFTs</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_many_dft_r2c(), fftw_plan_many_dft_c2r()</samp> with multiple 1D, 2D, 3D transforms
                           </td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_many_dft_r2c(), fftw_plan_many_dft_c2r()</samp> with 4D or higher transforms or a 2D or higher batch of embedded transforms
                           </td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Advanced Real-to-Real Transforms</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">Not supported</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1"><strong class="ph b">Guru Interface</strong></td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">&nbsp;</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Interleaved and split arrays</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">Interleaved format</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">Split format</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Guru vector and transform sizes</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1"><samp class="ph codeph">fftw_iodim</samp> struct
                           </td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">&nbsp;</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Guru Complex DFTs</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_guru_dft(), fftw_plan_guru_dft_r2c(), fftw_plan_guru_dft_c2r()</samp> with multiple 1D, 2D, 3D transforms
                           </td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1"><samp class="ph codeph">fftw_plan_guru_dft(), fftw_plan_guru_dft_r2c(), fftw_plan_guru_dft_c2r()</samp> with 4D or higher transforms or a 2D or higher batch of transforms
                           </td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Guru Real-data DFTs</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">Not supported</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Guru Real-to-real Transforms</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">Not supported</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">64-bit Guru Interface</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">Not supported</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">New-array Execute Functions</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1"><samp class="ph codeph">fftw_execute_dft(), fftw_execute_dft_r2c(), fftw_execute_dft_c2r()</samp> with interleaved format
                           </td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1">Split format and real-to-real functions</td>
                        </tr>
                        <tr class="row">
                           <td class="entry" valign="top" width="25%" headers="d54e9843" rowspan="1" colspan="1">Wisdom</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9846" rowspan="1" colspan="1">&nbsp;</td>
                           <td class="entry" valign="top" width="37.5%" headers="d54e9849" rowspan="1" colspan="1"><samp class="ph codeph">fftw_export_wisdom_to_file(), fftw_import_wisdom_from_file()</samp> exist but are not functional. Other wisdom functions do not have entry points in the library.
                           </td>
                        </tr>
                     </tbody>
                  </table>
               </div>
            </div>
         </div>
         <div class="topic concept nested0" id="notices-header"><a name="notices-header" shape="rect">
               <!-- --></a><h2 class="title topictitle1"><a href="#notices-header" name="notices-header" shape="rect">Notices</a></h2>
            <div class="topic reference nested1" id="notice"><a name="notice" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#notice" name="notice" shape="rect"></a></h3>
               <div class="body refbody">
                  <div class="section">
                     <h3 class="title sectiontitle">Notice</h3>
                     <p class="p">ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND
                        SEPARATELY, "MATERIALS") ARE BEING PROVIDED "AS IS." NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE
                        WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS
                        FOR A PARTICULAR PURPOSE. 
                     </p>
                     <p class="p">Information furnished is believed to be accurate and reliable. However, NVIDIA Corporation assumes no responsibility for the
                        consequences of use of such information or for any infringement of patents or other rights of third parties that may result
                        from its use. No license is granted by implication of otherwise under any patent rights of NVIDIA Corporation. Specifications
                        mentioned in this publication are subject to change without notice. This publication supersedes and replaces all other information
                        previously supplied. NVIDIA Corporation products are not authorized as critical components in life support devices or systems
                        without express written approval of NVIDIA Corporation.
                     </p>
                  </div>
               </div>
            </div>
            <div class="topic reference nested1" id="trademarks"><a name="trademarks" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#trademarks" name="trademarks" shape="rect"></a></h3>
               <div class="body refbody">
                  <div class="section">
                     <h3 class="title sectiontitle">Trademarks</h3>
                     <p class="p">NVIDIA and the NVIDIA logo are trademarks or registered trademarks of NVIDIA Corporation
                        in the U.S. and other countries.  Other company and product names may be trademarks of
                        the respective companies with which they are associated.
                     </p>
                  </div>
               </div>
            </div>
            <div class="topic reference nested1" id="copyright-past-to-present"><a name="copyright-past-to-present" shape="rect">
                  <!-- --></a><h3 class="title topictitle2"><a href="#copyright-past-to-present" name="copyright-past-to-present" shape="rect"></a></h3>
               <div class="body refbody">
                  <div class="section">
                     <h3 class="title sectiontitle">Copyright</h3>
                     <p class="p">© <span class="ph">2007</span>-<span class="ph">2013</span> NVIDIA
                        Corporation. All rights reserved.
                     </p>
                  </div>
               </div>
            </div>
         </div>
         
         <hr id="contents-end"></hr>
         <div id="release-info">CUFFT
            (<a href="../../pdf/CUFFT_Library.pdf">PDF</a>)
            -
            CUDA Toolkit v5.5
            (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>)
            -
            Last updated 
            July 19, 2013
            -
            <a href="mailto:cudatools@nvidia.com?subject=CUDA Tools Documentation Feedback: cufft">Send Feedback</a></div>
         
      </article>
      
      <header id="header"><span id="company">NVIDIA</span><span id="site-title">CUDA Toolkit Documentation</span><form id="search" method="get" action="search">
            <input type="text" name="search-text"></input><fieldset id="search-location">
               <legend>Search In:</legend>
               <label><input type="radio" name="search-type" value="site"></input>Entire Site</label>
               <label><input type="radio" name="search-type" value="document"></input>Just This Document</label></fieldset>
            <button type="reset">clear search</button>
            <button id="submit" type="submit">search</button></form>
      </header>
      <nav id="site-nav">
         <div class="category closed"><span class="twiddle">▷</span><a href="../index.html" title="The root of the site.">CUDA Toolkit</a></div>
         <ul class="closed">
            <li><a href="../cuda-toolkit-release-notes/index.html" title="The Release Notes for the CUDA Toolkit from v4.0 to today.">Release Notes</a></li>
            <li><a href="../eula/index.html" title="The End User License Agreements for the NVIDIA CUDA Toolkit, the NVIDIA CUDA Samples, the NVIDIA Display Driver, and NVIDIA NSight (Visual Studio Edition).">EULA</a></li>
            <li><a href="../cuda-getting-started-guide-for-linux/index.html" title="This guide discusses how to install and check for correct operation of the CUDA Development Tools on GNU/Linux systems.">Getting Started Linux</a></li>
            <li><a href="../cuda-getting-started-guide-for-mac-os-x/index.html" title="This guide discusses how to install and check for correct operation of the CUDA Development Tools on Mac OS X systems.">Getting Started Mac OS X</a></li>
            <li><a href="../cuda-getting-started-guide-for-microsoft-windows/index.html" title="This guide discusses how to install and check for correct operation of the CUDA Development Tools on Microsoft Windows systems.">Getting Started Windows</a></li>
            <li><a href="../cuda-c-programming-guide/index.html" title="This guide provides a detailed discussion of the CUDA programming model and programming interface. It then describes the hardware implementation, and provides guidance on how to achieve maximum performance. The Appendixes include a list of all CUDA-enabled devices, detailed description of all extensions to the C language, listings of supported mathematical functions, C++ features supported in host and device code, details on texture fetching, technical specifications of various devices, and concludes by introducing the low-level driver API.">Programming Guide</a></li>
            <li><a href="../cuda-c-best-practices-guide/index.html" title="This guide presents established parallelization and optimization techniques and explains coding metaphors and idioms that can greatly simplify programming for CUDA-capable GPU architectures. The intent is to provide guidelines for obtaining the best performance from NVIDIA GPUs using the CUDA Toolkit.">Best Practices Guide</a></li>
            <li><a href="../kepler-compatibility-guide/index.html" title="This application note is intended to help developers ensure that their NVIDIA CUDA applications will run effectively on GPUs based on the NVIDIA Kepler Architecture. This document provides guidance to ensure that your software applications are compatible with Kepler.">Kepler Compatibility Guide</a></li>
            <li><a href="../kepler-tuning-guide/index.html" title="Kepler is NVIDIA's next-generation architecture for CUDA compute applications. Applications that follow the best practices for the Fermi architecture should typically see speedups on the Kepler architecture without any code changes. This guide summarizes the ways that an application can be fine-tuned to gain additional speedups by leveraging Kepler architectural features.">Kepler Tuning Guide</a></li>
            <li><a href="../parallel-thread-execution/index.html" title="This guide provides detailed instructions on the use of PTX, a low-level parallel thread execution virtual machine and instruction set architecture (ISA). PTX exposes the GPU as a data-parallel computing device.">PTX ISA</a></li>
            <li><a href="../optimus-developer-guide/index.html" title="This document explains how CUDA APIs can be used to query for GPU capabilities in NVIDIA Optimus systems.">Developer Guide for Optimus</a></li>
            <li><a href="../video-decoder/index.html" title="This document provides the video decoder API specification and the format conversion and display using DirectX or OpenGL following decode.">Video Decoder</a></li>
            <li><a href="../video-encoder/index.html" title="This document provides the CUDA video encoder specifications, including the C-library API functions and encoder query parameters.">Video Encoder</a></li>
            <li><a href="../inline-ptx-assembly/index.html" title="This document shows how to inline PTX (parallel thread execution) assembly language statements into CUDA code. It describes available assembler statement parameters and constraints, and the document also provides a list of some pitfalls that you may encounter.">Inline PTX Assembly</a></li>
            <li><a href="../cuda-runtime-api/index.html" title="The CUDA runtime API.">CUDA Runtime API</a></li>
            <li><a href="../cuda-driver-api/index.html" title="The CUDA driver API.">CUDA Driver API</a></li>
            <li><a href="../cuda-math-api/index.html" title="The CUDA math API.">CUDA Math API</a></li>
            <li><a href="../cublas/index.html" title="The CUBLAS library is an implementation of BLAS (Basic Linear Algebra Subprograms) on top of the NVIDIA CUDA runtime. It allows the user to access the computational resources of NVIDIA Graphical Processing Unit (GPU), but does not auto-parallelize across multiple GPUs.">CUBLAS</a></li>
            <li><a href="../cufft/index.html" title="The CUFFT library user guide.">CUFFT</a></li>
            <li><a href="../curand/index.html" title="The CURAND library user guide.">CURAND</a></li>
            <li><a href="../cusparse/index.html" title="The CUSPARSE library user guide.">CUSPARSE</a></li>
            <li><a href="../npp/index.html" title="NVIDIA NPP is a library of functions for performing CUDA accelerated processing. The initial set of functionality in the library focuses on imaging and video processing and is widely applicable for developers in these areas. NPP will evolve over time to encompass more of the compute heavy tasks in a variety of problem domains. The NPP library is written to maximize flexibility, while maintaining high performance.">NPP</a></li>
            <li><a href="../thrust/index.html" title="The Thrust getting started guide.">Thrust</a></li>
            <li><a href="../cuda-samples/index.html" title="This document contains a complete listing of the code samples that are included with the NVIDIA CUDA Toolkit. It describes each code sample, lists the minimum GPU specification, and provides links to the source code and white papers if available.">CUDA Samples</a></li>
            <li><a href="../cuda-compiler-driver-nvcc/index.html" title="This document is a reference guide on the use of the CUDA compiler driver nvcc. Instead of being a specific CUDA compilation driver, nvcc mimics the behavior of the GNU compiler gcc, accepting a range of conventional compiler options, such as for defining macros and include/library paths, and for steering the compilation process.">NVCC</a></li>
            <li><a href="../cuda-gdb/index.html" title="The NVIDIA tool for debugging CUDA applications running on Linux and Mac, providing developers with a mechanism for debugging CUDA applications running on actual hardware. CUDA-GDB is an extension to the x86-64 port of GDB, the GNU Project debugger.">CUDA-GDB</a></li>
            <li><a href="../cuda-memcheck/index.html" title="CUDA-MEMCHECK is a suite of run time tools capable of precisely detecting out of bounds and misaligned memory access errors, checking device allocation leaks, reporting hardware errors and identifying shared memory data access hazards.">CUDA-MEMCHECK</a></li>
            <li><a href="../nsight-eclipse-edition-getting-started-guide/index.html" title="Nsight Eclipse Edition getting started guide">Nsight Eclipse Edition</a></li>
            <li><a href="../profiler-users-guide/index.html" title="This is the guide to the Profiler.">Profiler</a></li>
            <li><a href="../cuda-binary-utilities/index.html" title="The application notes for cuobjdump and nvdisasm.">CUDA Binary Utilities</a></li>
            <li><a href="../floating-point/index.html" title="A number of issues related to floating point accuracy and compliance are a frequent source of confusion on both CPUs and GPUs. The purpose of this white paper is to discuss the most common issues related to NVIDIA GPUs and to supplement the documentation in the CUDA C Programming Guide.">Floating Point and IEEE 754</a></li>
            <li><a href="../incomplete-lu-cholesky/index.html" title="In this white paper we show how to use the CUSPARSE and CUBLAS libraries to achieve a 2x speedup over CPU in the incomplete-LU and Cholesky preconditioned iterative methods. We focus on the Bi-Conjugate Gradient Stabilized and Conjugate Gradient iterative methods, that can be used to solve large sparse nonsymmetric and symmetric positive definite linear systems, respectively. Also, we comment on the parallel sparse triangular solve, which is an essential building block in these algorithms.">Incomplete-LU and Cholesky Preconditioned Iterative Methods</a></li>
            <li><a href="../libnvvm-api/index.html" title="The libNVVM API.">libNVVM API</a></li>
            <li><a href="../libdevice-users-guide/index.html" title="The libdevice library is an LLVM bitcode library that implements common functions for GPU kernels.">libdevice User's Guide</a></li>
            <li><a href="../nvvm-ir-spec/index.html" title="NVVM IR is a compiler IR (internal representation) based on the LLVM IR. The NVVM IR is designed to represent GPU compute kernels (for example, CUDA kernels). High-level language front-ends, like the CUDA C compiler front-end, can generate NVVM IR.">NVVM IR</a></li>
            <li><a href="../cupti/index.html" title="The CUPTI API.">CUPTI</a></li>
            <li><a href="../debugger-api/index.html" title="The CUDA debugger API.">Debugger API</a></li>
            <li><a href="../gpudirect-rdma/index.html" title="A tool for Kepler-class GPUs and CUDA 5.0 enabling a direct path for communication between the GPU and a peer device on the PCI Express bus when the devices share the same upstream root complex using standard features of PCI Express. This document introduces the technology and describes the steps necessary to enable a RDMA for GPUDirect connection to NVIDIA GPUs within the Linux device driver model.">RDMA for GPUDirect</a></li>
         </ul>
         <div class="category"><span class="twiddle">▼</span><a href="index.html" title="CUFFT">CUFFT</a></div>
         <ul>
            <li><a href="#introduction">1.&nbsp;Introduction</a></li>
            <li><a href="#using-the-cufft-api">2.&nbsp;Using the CUFFT API</a><ul>
                  <li><a href="#accessing-cufft">2.1.&nbsp;Accessing CUFFT</a></li>
                  <li><a href="#cufft-setup">2.2.&nbsp;Fourier Transform Setup</a></li>
                  <li><a href="#fft-types">2.3.&nbsp;Fourier Transform Types</a></li>
                  <li><a href="#data-layout">2.4.&nbsp;Data Layout</a><ul>
                        <li><a href="#fftw-compatibility-mode">2.4.1.&nbsp;FFTW Compatibility Mode</a></li>
                     </ul>
                  </li>
                  <li><a href="#multi-dimensional">2.5.&nbsp;Multidimensional transforms</a></li>
                  <li><a href="#advanced-data-layout">2.6.&nbsp;Advanced Data Layout</a></li>
                  <li><a href="#streamed-cufft-transforms">2.7.&nbsp;Streamed CUFFT Transforms</a></li>
                  <li><a href="#thread-safety">2.8.&nbsp;Thread Safety</a></li>
                  <li><a href="#accuracy-and-performance">2.9.&nbsp;Accuracy and Performance</a></li>
               </ul>
            </li>
            <li><a href="#cufft-api-reference">3.&nbsp;CUFFT API Reference</a><ul>
                  <li><a href="#cufftresult">3.1.&nbsp;Return value cufftResult</a></li>
                  <li><a href="#plan-basic">3.2.&nbsp;CUFFT Basic Plans</a><ul>
                        <li><a href="#function-cufftplan1d">3.2.1.&nbsp;Function cufftPlan1d()</a></li>
                        <li><a href="#function-cufftplan2d">3.2.2.&nbsp;Function cufftPlan2d()</a></li>
                        <li><a href="#function-cufftplan3d">3.2.3.&nbsp;Function cufftPlan3d()</a></li>
                        <li><a href="#function-cufftplanmany">3.2.4.&nbsp;Function cufftPlanMany()</a></li>
                     </ul>
                  </li>
                  <li><a href="#plan-extensible">3.3.&nbsp;CUFFT Extensible Plans</a><ul>
                        <li><a href="#function-cufftcreate">3.3.1.&nbsp;Function cufftCreate()</a></li>
                        <li><a href="#function-cufftmakeplan1d">3.3.2.&nbsp;Function cufftMakePlan1d()</a></li>
                        <li><a href="#function-cufftmakeplan2d">3.3.3.&nbsp;Function cufftMakePlan2d()</a></li>
                        <li><a href="#function-cufftmakeplan3d">3.3.4.&nbsp;Function cufftMakePlan3d()</a></li>
                        <li><a href="#function-cufftmakeplanmany">3.3.5.&nbsp;Function cufftMakePlanMany()</a></li>
                     </ul>
                  </li>
                  <li><a href="#work-estimate">3.4.&nbsp;CUFFT Estimated Size of Work Area</a><ul>
                        <li><a href="#function-cufftestimate1d">3.4.1.&nbsp;Function cufftEstimate1d()</a></li>
                        <li><a href="#function-cufftestimate2d">3.4.2.&nbsp;Function cufftEstimate2d()</a></li>
                        <li><a href="#function-cufftestimate3d">3.4.3.&nbsp;Function cufftEstimate3d()</a></li>
                        <li><a href="#function-cufftestimatemany">3.4.4.&nbsp;Function cufftEstimateMany()</a></li>
                     </ul>
                  </li>
                  <li><a href="#work-estimate-refined">3.5.&nbsp;CUFFT Refined Estimated Size of Work Area</a><ul>
                        <li><a href="#function-cufftgetsize1d">3.5.1.&nbsp;Function cufftGetSize1d()</a></li>
                        <li><a href="#function-cufftgetsize2d">3.5.2.&nbsp;Function cufftGetSize2d()</a></li>
                        <li><a href="#function-cufftgetsize3d">3.5.3.&nbsp;Function cufftGetSize3d()</a></li>
                        <li><a href="#function-cufftgetsizemany">3.5.4.&nbsp;Function cufftGetSizeMany()</a></li>
                     </ul>
                  </li>
                  <li><a href="#function-cufftgetsize">3.6.&nbsp;Function cufftGetSize()</a></li>
                  <li><a href="#unique_316245821">3.7.&nbsp;CUFFT Caller Allocated Work Area Support</a><ul>
                        <li><a href="#function-cufftsetautoallocation">3.7.1.&nbsp;Function cufftSetAutoAllocation()</a></li>
                        <li><a href="#function-cufftsetworkarea">3.7.2.&nbsp;Function cufftSetWorkArea()</a></li>
                     </ul>
                  </li>
                  <li><a href="#function-cufftdestroy">3.8.&nbsp;Function cufftDestroy()</a></li>
                  <li><a href="#plan-execution">3.9.&nbsp;CUFFT Execution</a><ul>
                        <li><a href="#function-cufftexecc2c-cufftexecz2z">3.9.1.&nbsp;Functions cufftExecC2C() and cufftExecZ2Z()</a></li>
                        <li><a href="#function-cufftexecr2c-cufftexecd2z">3.9.2.&nbsp;Functions cufftExecR2C() and cufftExecD2Z()</a></li>
                        <li><a href="#function-cufftexecc2r-cufftexecz2d">3.9.3.&nbsp;Functions cufftExecC2R() and cufftExecZ2D()</a></li>
                     </ul>
                  </li>
                  <li><a href="#function-cufftsetstream">3.10.&nbsp;Function cufftSetStream()</a></li>
                  <li><a href="#function-cufftgetversion">3.11.&nbsp;Function cufftGetVersion()</a></li>
                  <li><a href="#function-cufftsetcompatibilitymode">3.12.&nbsp;Function cufftSetCompatibilityMode()</a></li>
                  <li><a href="#cufftcompatibility">3.13.&nbsp;Parameter cufftCompatibility</a></li>
                  <li><a href="#cufft-types">3.14.&nbsp;CUFFT Types</a><ul>
                        <li><a href="#cufft-transform-types">3.14.1.&nbsp;Parameter cufftType</a></li>
                        <li><a href="#cufft-transform-directions">3.14.2.&nbsp;Parameters for Transform Direction</a></li>
                        <li><a href="#cufft-types-others">3.14.3.&nbsp;Other CUFFT Types</a><ul>
                              <li><a href="#cuffthandle">3.14.3.1.&nbsp;cufftHandle</a></li>
                              <li><a href="#cufftreal">3.14.3.2.&nbsp;cufftReal</a></li>
                              <li><a href="#cufftdoublereal">3.14.3.3.&nbsp;cufftDoubleReal</a></li>
                              <li><a href="#cufftcomplex">3.14.3.4.&nbsp;cufftComplex</a></li>
                              <li><a href="#cufftdoublecomplex">3.14.3.5.&nbsp;cufftDoubleComplex</a></li>
                           </ul>
                        </li>
                     </ul>
                  </li>
               </ul>
            </li>
            <li><a href="#cufft-code-examples">4.&nbsp;CUFFT Code Examples</a><ul>
                  <li><a href="#oned-complex-to-complex-transforms">4.1.&nbsp;1D Complex-to-Complex Transforms</a></li>
                  <li><a href="#oned-real-to-complex-transforms">4.2.&nbsp;1D Real-to-Complex Transforms</a></li>
                  <li><a href="#twod-complex-to-real-transforms">4.3.&nbsp;2D Complex-to-Real Transforms</a></li>
                  <li><a href="#threed-complex-to-complex-transforms">4.4.&nbsp;3D Complex-to-Complex Transforms</a></li>
                  <li><a href="#twod-advanced-data-layout-use">4.5.&nbsp;2D Advanced Data Layout Use</a></li>
               </ul>
            </li>
            <li><a href="#fftw-conversion-guide">5.&nbsp;FFTW Conversion Guide</a></li>
            <li><a href="#fftw-supported-interface">6.&nbsp;FFTW Interface to CUFFT</a></li>
         </ul>
      </nav>
      <nav id="search-results">
         <h2>Search Results</h2>
         <ol></ol>
      </nav>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/formatting/common.min.js"></script>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/omniture/s_code_us_dev_aut1-nolinktrackin.js"></script>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/omniture/omniture.js"></script>
      <noscript><a href="http://www.omniture.com" title="Web Analytics"><img src="http://omniture.nvidia.com/b/ss/nvidiacudadocs/1/H.17--NS/0" height="1" width="1" border="0" alt=""></img></a></noscript>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-write.js"></script>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-tracker.js"></script>
      </body>
</html>