1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
|
.. toctree::
:maxdepth: 4
:caption: Contents:
=========
API Usage
=========
This section describes usage of the hipFFT library API. The hipFFT
API follows the `cuFFT`_ API.
.. _cuFFT: https://docs.nvidia.com/cuda/cufft/
Types
-----
There are a few data structures that are internal to the library. The
pointer types to these structures are given below. The user would
need to use these types to create handles and pass them between
different library functions.
.. doxygendefine:: HIPFFT_FORWARD
.. doxygendefine:: HIPFFT_BACKWARD
.. doxygenenum:: hipfftType
.. doxygentypedef:: hipfftHandle
.. doxygenenum:: hipfftResult
Simple plans
------------
These planning routines allocate a plan for you. If execution of the
plan requires a work buffer, it will be created (and destroyed)
automatically.
.. doxygenfunction:: hipfftPlan1d
.. doxygenfunction:: hipfftPlan2d
.. doxygenfunction:: hipfftPlan3d
User managed simple plans
-------------------------
These planning routines assume that you have allocated a plan
(`hipfftHandle`) yourself; and that you will manage a work area as
well.
If you want to manage your own work buffer... XXX
.. doxygenfunction:: hipfftCreate
.. doxygenfunction:: hipfftDestroy
.. doxygenfunction:: hipfftSetAutoAllocation
.. doxygenfunction:: hipfftMakePlan1d
.. doxygenfunction:: hipfftMakePlan2d
.. doxygenfunction:: hipfftMakePlan3d
More advanced plans
-------------------
.. doxygenfunction:: hipfftMakePlanMany
.. doxygenfunction:: hipfftXtMakePlanMany
Estimating work area sizes
--------------------------
These call return estimates of the work area required to support a
plan generated with the same parameters (either with the simple or
extensible API). Callers who choose to manage work area allocation
within their application must use this call after plan generation, and
after any hipfftSet*() calls subsequent to plan generation, if those
calls might alter the required work space size.
.. doxygenfunction:: hipfftEstimate1d
.. doxygenfunction:: hipfftEstimate2d
.. doxygenfunction:: hipfftEstimate3d
.. doxygenfunction:: hipfftEstimateMany
Accurate work area sizes
------------------------
After plan generation is complete, an accurate work area size can be
obtained with these routines.
.. doxygenfunction:: hipfftGetSize1d
.. doxygenfunction:: hipfftGetSize2d
.. doxygenfunction:: hipfftGetSize3d
.. doxygenfunction:: hipfftGetSizeMany
.. doxygenfunction:: hipfftXtGetSizeMany
Executing plans
---------------
Once you have created an FFT plan, you can execute it using one of the
`hipfftExec*` functions.
For real-to-complex transforms, the output buffer XXX
For complex-to-real transforms, the output buffer XXX
.. doxygenfunction:: hipfftExecC2C
.. doxygenfunction:: hipfftExecR2C
.. doxygenfunction:: hipfftExecC2R
.. doxygenfunction:: hipfftExecZ2Z
.. doxygenfunction:: hipfftExecD2Z
.. doxygenfunction:: hipfftExecZ2D
.. doxygenfunction:: hipfftXtExec
Callbacks
---------
.. doxygenfunction:: hipfftXtSetCallback
.. doxygenfunction:: hipfftXtClearCallback
.. doxygenfunction:: hipfftXtSetCallbackSharedSize
Single-process Multi-gpu Transforms
-----------------------------------
hipFFT offers experimental single-process multi-GPU transforms.
Multiple devices can be associated to a :cpp:type:`hipfftHandle` using
:cpp:func:`hipfftXtSetGPUs`. Once a plan is associated to multiple
GPUs, :cpp:struct:`hipLibXtDesc` is used to pass multiple GPU buffers
to the plan for execution. These buffers are allocated via
:cpp:func:`hipfftXtMalloc`, and free'd with :cpp:func:`hipfftXtFree`.
The function :cpp:func:`hipfftXtMemcpy` allows one to move data to or
from a :cpp:struct:`hipLibXtDesc` and a contiguous host buffer, or
between two :cpp:struct:`hipLibXtDesc` s.
Execution is performed with the appropriate
:cpp:func:`hipfftXtExecDescriptor`
.. doxygenfunction:: hipfftXtSetGPUs
.. doxygenstruct:: hipXtDesc
.. doxygenstruct:: hipLibXtDesc
.. doxygenfunction:: hipfftXtMalloc
.. doxygenfunction:: hipfftXtFree
.. doxygenfunction:: hipfftXtMemcpy
.. doxygengroup:: hipfftXtExecDescriptor
|