![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/CUDA/cuFFT.h>
Fast Fourier Transform using CUDA Input must consist of interleaved complex values and match the descriptor used for the constructor. More...
Fast Fourier Transform using CUDA Input must consist of interleaved complex values and match the descriptor used for the constructor.
Output has the same data layout. Does not perform any normalization, i.e. the forward-backward round trip multiplies pixel values by image size.
Public Member Functions | |
| Complex2Complex (const ImageDescriptor &d) | |
| Creates a plan and allocates GPU buffers suitable for the given image. | |
| std::unique_ptr< TypedImage< float > > | run (const TypedImage< float > &img, bool forward) |
| Returns the transformed image, or nullptr on error. | |
| bool | run (const CUDA::DeviceBufferView &in, CUDA::DeviceBufferView &out, bool forward) |
| Performs transform using the specified buffers. | |
| CUDA::DeviceBufferView * | run (const CUDA::DeviceBufferView &in, bool forward) |
| Convenience function that uses an internal buffer to hold the result and returns a non-owning pointer to that (or nullptr in case of errors). | |
| bool | compatible (const ImageDescriptor &desc) const |
| ImFusion::cuFFT::Complex2Complex::Complex2Complex | ( | const ImageDescriptor & | d | ) |
Creates a plan and allocates GPU buffers suitable for the given image.
If allocation fails or the descriptor is unsuitable (not 2 channels), the object will be invalid and run always fails.
| std::unique_ptr< TypedImage< float > > ImFusion::cuFFT::Complex2Complex::run | ( | const TypedImage< float > & | img, |
| bool | forward ) |
Returns the transformed image, or nullptr on error.
The forward argument specifies whether this transform is to frequency domain or back to time domain.
| bool ImFusion::cuFFT::Complex2Complex::run | ( | const CUDA::DeviceBufferView & | in, |
| CUDA::DeviceBufferView & | out, | ||
| bool | forward ) |
Performs transform using the specified buffers.
Will do an in-place transform when passing the same buffer twice. The forward argument specifies whether this transform is to frequency domain or back to time domain.
| CUDA::DeviceBufferView * ImFusion::cuFFT::Complex2Complex::run | ( | const CUDA::DeviceBufferView & | in, |
| bool | forward ) |
Convenience function that uses an internal buffer to hold the result and returns a non-owning pointer to that (or nullptr in case of errors).
Use in cases where you do not need a copy of the result and want to run multiple transforms (avoids creating new output buffers).