Quantcast
Channel: Intel® Software - Intel® Integrated Performance Primitives
Viewing all articles
Browse latest Browse all 1489

ippsDFTInv_CToC_64f No Longer Supported?

$
0
0

I have the following working code:

IppsDFTSpec_C_64f *spec;
ippsDFTInitAlloc_C_64f(&spec, N, IPP_FFT_NODIV_BY_ANY, ippAlgHintAccurate);
ippsDFTInv_CToC_64f(pRealData, pImagData, pRealData, pImagData, spec, NULL);

Yet the newer compilers (version 13.0.1 in my case) complain about the InitAlloc being deprecated.  I tried to switch to the new recommended way, but there seems to be no ippsDFTInit_C_64f function.  There is a ippsDFTInit_C_64fc version (note fc vice f at the end), but to use this I have to introduce 2 data copies to make it work:

int specSize, initSize, workSize;
IppStatus status = ippsDFTGetSize_C_64fc(N, IPP_FFT_NODIV_BY_ANY, ippAlgHintAccurate, &specSize, &initSize, &workSize);
IppsDFTSpec_C_64fc *fftSpec = (IppsDFTSpec_C_64fc*)ippsMalloc_8u(specSize);
Ipp8u* pInitBuf = ippsMalloc_8u(initSize);
status = ippsDFTInit_C_64fc(N, IPP_FFT_NODIV_BY_ANY, ippAlgHintAccurate, fftSpec, pInitBuf);
if (pInitBuf) ippsFree(pInitBuf);
Ipp8u* pWorkBuf = ippsMalloc_8u(workSize);
Ipp64fc* pComplexData = ippsMalloc_64fc(N);
for (int i=0; i<N; i++) {
    pComplexData[i].re = pRealData[i];
    pComplexData[i].im = pImagData[i];
}
ippsDFTInv_CToC_64fc(pComplexData, pComplexData, fftSpec, pWorkBuf);
for (EcUint4 i=0; i<N; i++) {
    pRealData[i] = pComplexData[i].re;
    pImagData[i] = pComplexData[i].im;
}
ippsFree(pComplexData);

Is there any way to use ippsDFTInv_CToC_64f?  If not, it seems to me the better option is to stick with the deprecated code to avoid the data copying (and the code bloat).


Viewing all articles
Browse latest Browse all 1489

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>