Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
6600 Discussions

FFT. Inconsistency of documentation or bug?

hatuey
Beginner
502 Views

About IPP ippsFFTFwd_R function -
If the external buffer is not specified (pBuffer is set to NULL), then the function itself allocates the memory needed for operation.
(C) Intel IPP developer reference, vol. 1: Signal Processing
Sorry, it's true? Look at this.
Code:
#include <stdio.h>
#include <ipp.h>
#include <ipps.h>
int main(void) {
int order, sizeFFTSpec, sizeFFTInitBuf, sizeFFTWorkBuf;
IppStatus initstatus, transformstatus;
float *pData = ippsMalloc_32f(1 << 16);
ippsZero_32f(pData, 1 << 16); // it does not matter
for (order = 4; order <= 16; order++) {
IppsFFTSpec_R_32f* pFFTSpec;
Ipp8u* pFFTSpecBuf, * pFFTInitBuf;
ippsFFTGetSize_R_32f(order, IPP_FFT_NODIV_BY_ANY,
ippAlgHintNone, &sizeFFTSpec,
&sizeFFTInitBuf, &sizeFFTWorkBuf);
pFFTSpecBuf = ippsMalloc_8u(sizeFFTSpec);
pFFTInitBuf = ippsMalloc_8u(sizeFFTInitBuf);
initstatus = ippsFFTInit_R_32f(&pFFTSpec, order, IPP_FFT_NODIV_BY_ANY,
ippAlgHintNone, pFFTSpecBuf, pFFTInitBuf);
if (initstatus == ippStsNoErr) {
transformstatus = ippsFFTFwd_RToCCS_32f_I(pData, pFFTSpec, nullptr);
printf("FFT order %d\t%s\n", order, ippGetStatusString(transformstatus));
}
else return -1;
ippsFree(pFFTSpec);
ippsFree(pFFTInitBuf);
}
return 0;
}
Output:
FFT order 4 ippStsNoErr: No errors
FFT order 5 ippStsNoErr: No errors
FFT order 6 ippStsNoErr: No errors
FFT order 7 ippStsNoErr: No errors
FFT order 8 ippStsNullPtrErr: Null pointer error
FFT order 9 ippStsNullPtrErr: Null pointer error
...
and so on

UPD

IPP 2021.1.1, static version, Windows 10, MS Visual Studio 2019, MS C++ Compiler. Both Win32 & x64 platforms.

0 Kudos
1 Solution
Andrey_B_Intel
Employee
431 Views

Hi Hatuey.

IPP FFT does not allocate memory internally anymore. So noticed lines in documentation is obsolete now. We will update documentation in one of the next IPP releases.

Thanks that you use IPP since 7.0 version.

Andrey

IPP

 

View solution in original post

7 Replies
GouthamK_Intel
Moderator
470 Views

Hi,

Thanks for reaching out to us.

We are able to reproduce the same on our end, we are working on your issue internally and we will get back to you soon regarding the same.

 

Regards

Goutham

 

hatuey
Beginner
462 Views

Thanks comrade! Really now it is not so big problem for me, because now I am aware;-)

I can only add that somewhat earlier the behavior was corresponded to the documentation (IPP 7)

Andrey_B_Intel
Employee
432 Views

Hi Hatuey.

IPP FFT does not allocate memory internally anymore. So noticed lines in documentation is obsolete now. We will update documentation in one of the next IPP releases.

Thanks that you use IPP since 7.0 version.

Andrey

IPP

 

hatuey
Beginner
419 Views

Thanks Andrey!

Yes, updating the documentation would be useful to prevent problems with porting previously created applications, and in general.

With wishes of further success to the IPP team,

Hatuey

Gennady_F_Intel
Moderator
403 Views

we will keep this thread informed when the reference will be updated.


Gennady_F_Intel
Moderator
352 Views
Gennady_F_Intel
Moderator
352 Views

The issue is closing and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.


Reply