FourierTransform
The FourierTransform class provides a highly flexible and efficient implementation of the Fourier Transform, supporting a variety of input/output data formats and operations. It is designed for tasks such as signal processing, image processing, and simulations requiring complex transformations. The class supports different modes, such as interleaved, complex, and planar formats, along with various transform operations (forward and backward, real-to-complex and complex-to-real). It allows for the creation and dispatch of transformations on textures, enabling GPU-accelerated processing for large datasets. Additionally, the class offers flexibility in handling different data types and sizes, ensuring scalability across a range of applications.
#include <parallel/TellusimFourierTransform.h>
Constructors
FourierTransform()
Methods
Clear transform.
void clear()
Check transform.
bool isCreated(Mode mode) const
bool isCreated(Flags flags) const
Transform parameters.
uint32_t getMaxWidth() const
uint32_t getMaxHeight() const
Create transform.
bool create(const Device &device, Mode mode, uint32_t width, uint32_t height, Async *async = nullptr)
bool create(const Device &device, Flags flags, uint32_t width, uint32_t height, Async *async = nullptr)
Dispatch transform.
bool dispatch(Compute &compute, Mode mode, Operation op, Texture &dest, Texture &src, Slice dest_slice, Slice src_slice) const
bool dispatch(Compute &compute, Mode mode, Operation op, Texture &dest, Texture &src, Slice src_slice) const
bool dispatch(Compute &compute, Mode mode, Operation op, Texture &dest, Texture &src) const
Type | Name | Description |
---|---|---|
FourierTransform::Mode | mode | Transform mode. |
FourierTransform::Operation | op | Transform operation. |
Texture | dest | Destination texture. |
Texture | src | Source texture. |
Enums
Mode
Transform modes.
Name | Value | Description |
---|---|---|
ModeRf16i | 0 | One interleaved 16-bit per pixel component, texture format is FormatRGf16. |
ModeRf32i | 1 | One interleaved 32-bit per pixel component, texture format is FormatRGf32. |
ModeRGf16i | 2 | Two interleaved 16-bit per pixel components, texture format is FormatRGBAf16. |
ModeRGf32i | 3 | Two interleaved 32-bit per pixel components, texture format is FormatRGBAf32. |
ModeRGBf16c | 4 | Three complex 16-bit per pixel components, texture format is FormatRGBAf32. |
ModeRGBf21c | 5 | Three complex 21-bit per pixel components, texture format is FormatRGBAf32. |
ModeRGBf16p | 6 | Three planar 16-bit per pixel components, texture format is FormatRGBAf16x2. |
ModeRGBf32p | 7 | Three planar 32-bit per pixel components, texture format is FormatRGBAf32x2. |
NumModes | 8 |
Flags
Transform flags.
Name | Value |
---|---|
FlagNone | 0 |
FlagRf16i | (1 << ModeRf16i) |
FlagRf32i | (1 << ModeRf32i) |
FlagRGf16i | (1 << ModeRGf16i) |
FlagRGf32i | (1 << ModeRGf32i) |
FlagRGBf16c | (1 << ModeRGBf16c) |
FlagRGBf21c | (1 << ModeRGBf21c) |
FlagRGBf16p | (1 << ModeRGBf16p) |
FlagRGBf32p | (1 << ModeRGBf32p) |
FlagsInterleaved | (FlagRf16i | FlagRf32i | FlagRGf16i | FlagRGf32i) |
FlagsComplex | (FlagRGBf16c | FlagRGBf21c) |
FlagsPlanar | (FlagRGBf16p | FlagRGBf32p) |
FlagsAll | (FlagsInterleaved | FlagsComplex | FlagsPlanar) |
Operation
Transform operations.
Name | Value | Description |
---|---|---|
ForwardCtoC | 0 | Complex to complex forward transform. |
BackwardCtoC | 1 | Complex to complex backward transform. |
ForwardRtoC | 2 | Real to complex forward transform. |
BackwardCtoR | 3 | Complex to real backward transform. |
NumOperations | 4 |