cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

cipoint
Journeyman III

convolution of real data using clAmdFft

Hello,

I want to perform a convolution with the clAmdFft library (by the way: good work!). The input data and the convolution kernel are both real.

The general procedure is:

transform input A

transform kernel B

multiply the results componentwise

transform back the product

in words: A o B = iFT[FT * FT]

I've implemented it with complex-to-complex (C2C) transformations only and it works fine. The resulting convolution is real data only. Because I have also other operations (kernels) dealing with the input data, I have to expand the buffer A from real to complex then convolve it and then reduce the results from complex to real. This looks somewhat unnecessary for me ...

Here's the question: Do I have to perform a complex-to-complex FFT in the convolution algorithm? Or might it be sufficient to use real-to-complex (R2C) transformation for A and B, gaining hermitian data and then use complex-to-real (C2R) for inverse transforming the componentwise product? I.e.:

A o B = iC2R_FT[R2C_FT * R2C_FT]

0 Likes
1 Solution

Hi,

You can do this using real FFTs, and your formula should work. The complex FFTs have better performance at larger sizes than the real FFTs. Not much effort has gone into optimizing real FFTs at larger sizes. But at smaller sizes (less than 4096 length at 1D)  real FFTs are better.

View solution in original post

0 Likes
1 Reply

Hi,

You can do this using real FFTs, and your formula should work. The complex FFTs have better performance at larger sizes than the real FFTs. Not much effort has gone into optimizing real FFTs at larger sizes. But at smaller sizes (less than 4096 length at 1D)  real FFTs are better.

0 Likes