- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good morning everybody,
we wonder here how to use the ippMoment functions in IPP 7.1
The following code sample gives us compiler warnings about deprecated code.Where is the mistake?
Many thanks for your help!
best regards,
Dennis
---- sample code ---
[cpp]
#include <ippi.h>
#include <iostream>
using namespace std;
int main( int /*argc*/, char* /*argv*/[] )
{
IppiMomentState_64f* ctxFloat=0;
// Allocate memory for IppiMomentState_64f
// ippiMomentInitAlloc_64f declared deprecated in
// http://software.intel.com/sites/products/documentation/doclib/ipp_sa/71/ipp_manual/IPPI/ippi_ch11/functn_MomentInitAlloc.htm
//
// how to allocate memory in the right way?
ippiMomentInitAlloc_64f(&ctxFloat, ippAlgHintNone);
// do some operations with not depreacted ippiMoments64f ... functions
// ippiMoments64f_16u_C1R (..., ctxFloat)
// ippiGetNormalizedCentralMoment_64f(ctxFloat, ...)
// see another example:
// http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch11/functn_GetHuMoments.html
// free memory
// ippiMomentFree_64f called deprecated in
// http://software.intel.com/sites/products/documentation/doclib/ipp_sa/71/ipp_manual/IPPI/ippi_ch11/functn_MomentFree.htm
//
// how to free memory in the right way?
ippiMomentFree_64f(ctxFloat);
ctxFloat = 0;
return 0;
}
[/cpp]
--- compiler output
[bash]
g++ -m32 -Wall -Wextra -ggdb3 -MD -O0 -fstrict-aliasing -I/opt/intel/composer_xe_2013.3.163/ipp/include -c test_ipp.cpp -o test_ipp.o
test_ipp.cpp: In function 'int main(int, char**)':
test_ipp.cpp:14:3: warning: 'IppStatus ippiMomentInitAlloc_64f(IppiMomentState_64f**, IppHintAlgorithm)' is deprecated (declared at /opt/intel/composer_xe_2013.3.163/ipp/include/ippi.h:7583) [-Wdeprecated-declarations]
test_ipp.cpp:14:52: warning: 'IppStatus ippiMomentInitAlloc_64f(IppiMomentState_64f**, IppHintAlgorithm)' is deprecated (declared at /opt/intel/composer_xe_2013.3.163/ipp/include/ippi.h:7583) [-Wdeprecated-declarations]
test_ipp.cpp:30:3: warning: 'IppStatus ippiMomentFree_64f(IppiMomentState_64f*)' is deprecated (declared at /opt/intel/composer_xe_2013.3.163/ipp/include/ippi.h:7603) [-Wdeprecated-declarations]
test_ipp.cpp:30:30: warning: 'IppStatus ippiMomentFree_64f(IppiMomentState_64f*)' is deprecated (declared at /opt/intel/composer_xe_2013.3.163/ipp/include/ippi.h:7603) [-Wdeprecated-declarations]
g++ -m32 -Wall -Wextra -ggdb3 -MD -O0 -fstrict-aliasing -I/opt/intel/composer_xe_2013.3.163/ipp/include test_ipp.o -L/opt/intel/composer_xe_2013.3.163/ipp/lib/ia32 -lippac_l -lippdc_l -lippcc_l -lippcv_l -lippj_l -lippdi_l -lippch_l -lippm_l -lippr_l -lippsc_l -lippvm_l -lippvc_l -lippi_l -lipps_l -lippcore_l -o test_ipp
[/bash]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dennis,
ippiMomentGetBufSize and ippiMomentInit pair will be introduced instead of InitAlloc/Free in one of the nearest IPP releases.
regards, Igor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Igor, hi Sergey
Just to get it right: We have to live with the warnings until the replacement fuctions are introduced in future. Not nice in our opinion but we'll get a way around it. Perhaps a hint in your docu would help other users.
Many thanks for you information,
Dennis

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