Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

FFT. Inconsistency of documentation or bug?

hatuey
Beginner
1,179 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
1,108 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

0 Kudos
7 Replies
GouthamK_Intel
Moderator
1,147 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

 

0 Kudos
hatuey
Beginner
1,139 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)

0 Kudos
Andrey_B_Intel
Employee
1,109 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

 

0 Kudos
hatuey
Beginner
1,096 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

0 Kudos
Gennady_F_Intel
Moderator
1,080 Views

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


0 Kudos
Gennady_F_Intel
Moderator
1,029 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.


0 Kudos
Reply