Skip to main content

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
TypeNameDescription
FourierTransform::ModemodeTransform mode.
FourierTransform::OperationopTransform operation.
TexturedestDestination texture.
TexturesrcSource texture.

Enums

Mode

Transform modes.

NameValueDescription
ModeRf16i0One interleaved 16-bit per pixel component, texture format is FormatRGf16.
ModeRf32i1One interleaved 32-bit per pixel component, texture format is FormatRGf32.
ModeRGf16i2Two interleaved 16-bit per pixel components, texture format is FormatRGBAf16.
ModeRGf32i3Two interleaved 32-bit per pixel components, texture format is FormatRGBAf32.
ModeRGBf16c4Three complex 16-bit per pixel components, texture format is FormatRGBAf32.
ModeRGBf21c5Three complex 21-bit per pixel components, texture format is FormatRGBAf32.
ModeRGBf16p6Three planar 16-bit per pixel components, texture format is FormatRGBAf16x2.
ModeRGBf32p7Three planar 32-bit per pixel components, texture format is FormatRGBAf32x2.
NumModes8

Flags

Transform flags.

NameValue
FlagNone0
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.

NameValueDescription
ForwardCtoC0Complex to complex forward transform.
BackwardCtoC1Complex to complex backward transform.
ForwardRtoC2Real to complex forward transform.
BackwardCtoR3Complex to real backward transform.
NumOperations4