Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

sever70

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-29-2012
12:39 AM

119 Views

ipps fft function

I am trying to take FFT of a real signal and also the output should be a real signal. Thus, I useone of these functions :

ippsFFTFwd_RToPerm_32f

ippsFFTFwd_RToPack_32f

ippsFFTFwd_RToCCS_32f

However the output signal doesn't match with the Matlab output of fft function. Any idea?Thanks in advance

Link Copied

9 Replies

Thomas_Jensen1

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-29-2012
01:56 AM

119 Views

What is it that doesn't match?

Numbers?

Numbers?

sever70

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-29-2012
02:14 AM

119 Views

Yes, the numbers doesn't match..

sever70

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-29-2012
02:21 AM

119 Views

Matlab output for a length of 8 array

4.000000

-1.414214

4.000000

1.414214

-4.000000

1.414214

4.000000

-1.414214

And by using these ippsfunctions,

ippsFFTInitAlloc_R_32f( &pSpec, 3, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone );

ippsFFTFwd_RToCCS_32f(pX, pY, pSpec, pBuf);

I got these outputs:

4

0

-1.41421

-1.41421

4

-4

1.41421

-1.41421

Thomas_Jensen1

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-29-2012
02:27 AM

119 Views

Look at the IPP definition of CCP, you'll see it there:

http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/lin/ipp/ipps/ipps_c...

sever70

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-29-2012
02:30 AM

119 Views

SergeyKostrov

Valued Contributor II

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-29-2012
05:27 AM

119 Views

Quoting sever70

I am trying to take FFT of a real signal and also the output should be a real signal. Thus, I useone of these functions :

ippsFFTFwd_RToPerm_32f

ippsFFTFwd_RToPack_32f

ippsFFTFwd_RToCCS_32f

However the output signal doesn't match with the Matlab output of fft function. Any idea?As far as I know the Matlab does calculations usingDouble-Precision variables. The set of IPPSfunctions

you're using are Single-Precision ( ..._32f ). Could you submit a complete IPP Test-Case?

Best regards,

Sergey

Thomas_Jensen1

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-29-2012
08:24 AM

119 Views

FFT and DFT uses different data domains (types) for efficiency purposes.

For instance, if you data is purely real, you can hold its complex version is a so-called packed domain. This is much smaller the the full complex version and thus faster (better cache utilization etc.).

However, if you print packed data, it looks not at all like normal complex data. You would have to convert packed to complex before printing it.

I don't really know useful purpose of the CCS format, but if you simply select normal complex output format, and then print that (possible first converting to real format), I'm sure your comparison would understandable.

Do you understand my text?

Ying_H_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-30-2012
01:45 AM

119 Views

Not sure Matlab's out put format. But same suggestion as Thomas,

The format is as below

Index | 0 | 1 | 2 | 3 | . . . | N-2 | N-1 | N | N+1 |
---|---|---|---|---|---|---|---|---|---|

Pack | R_{0} | R_{1} | I_{1} | R_{2} | . . . | I_{(N-1)/2} | R_{N/2} | ||

Perm | R_{0} | R_{N/2} | R_{1} | I_{1} | . . . | R_{N/2-1} | I_{N/2-1} | ||

CCS | R_{0} | 0 | R_{1} | I_{1} | . . . | R_{N/2-1} | I_{N/2-1} | R_{N/2} | 0 |

Index | 0 | 1 | 2 | 3 | . . . | N-2 | N-1 | N |
---|---|---|---|---|---|---|---|---|

Pack | R_{0} | R_{1} | I_{1} | R_{2} | . . . | R_{(N-1)/2} | I_{(N-1)/2} | |

Perm | R_{0} | R_{1} | I_{1} | R_{2} | . . . | R_{(N-1)/2} | I_{(N-1)/2} | |

CCS | R_{0} | 0 | R_{1} | I_{1} | . . . | I_{(N-1)/2-1} | R_{(N-1)/2} | I_{(N-1)/2} |

and you may use the Transform Functions to get real complex result.

Function Base Name | Operation |
---|---|

Support Functions | |

ConjPack | Converts the data inPack format to complex data format. |

ConjPerm | Converts the data in Perm format to complex data format. |

ConjCcs | Converts the data in CCS format to complex |

Best Regards,

Ying

sever70

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-30-2012
05:34 AM

119 Views

Thanks Thomas and Ying.Finally I got correctFFT values for real data by usingCCS format.

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.