Quantcast
Channel: Intel® Integrated Performance Primitives
Viewing all articles
Browse latest Browse all 1294

Howto initialize IppiMomentState_64f without deprecated functions

$
0
0

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 ---

#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;
}

--- compiler output

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

Viewing all articles
Browse latest Browse all 1294

Latest Images

Trending Articles



Latest Images

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