<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Sample code doesn't compile in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sample-code-doesn-t-compile/m-p/907852#M13757</link>
    <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I'm trying to get the gaussian/laplacian code to work, and the provided code in the documentation is very broken. I don't know how to fix it (I've been using the IPP for two days now), and any obvious help to fix the documentation would be helpful.&lt;BR /&gt;&lt;BR /&gt;In my application, we take an image down from roughly 4000x4000 to 1x1 and build it back up again, using 12 decomposition levels. I wanted to use the provided gaussian functions, but they break at about the fourth level down, simply because they hit into an odd/even bug (ie, the subsampled image has an even index, the upsampled image needs an odd index, and the default code (_Gauss5x5) won't allow for that). So, I started to use the more generic pyramid coding.&lt;BR /&gt;&lt;BR /&gt;Turns out, the sample code for that is just broken as is, and won't compile.&lt;BR /&gt;&lt;BR /&gt;Here's the sample code from the documentation, p14-69 of ippiman.pdf. I've added the srcRoi IppiSize structure, because I figure that part's right, as well as the 'rate' parameter. I haven't set the Kernel yet; I wanted to get the error count to something manageable before I implement the kernel. I was going to use a float array for pSrc, but I think I really need it to be of type Ipp32f* instead; that's something with which I can experiment.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;BR /&gt; IppiPyramid *gPyr; // pointer to Gaussian pyramid structure&lt;BR /&gt; IppiPyramid *lPyr; // pointer to Laplacian pyramid structure&lt;BR /&gt;// allocate pyramid structures&lt;BR /&gt; IppiSize srcRoi = {theColumns, theRows};&lt;BR /&gt; float rate = 2.0f; //decrease by 2 each time&lt;BR /&gt; ippiPyramidInitAlloc (&amp;amp;gPyr, 1000, srcRoi, rate);&lt;BR /&gt; ippiPyramidInitAlloc (&amp;amp;lPyr, 1000, srcRoi, rate);&lt;BR /&gt; {&lt;BR /&gt; IppiPyramidDownState_32f_C1R **gState =&lt;BR /&gt; (IppiPyramidDownState_32f_C1R*)&amp;amp;(gPyr-&amp;gt;pState);&lt;BR /&gt; IppiPyramidUpState_32f_C1R **lState = &lt;BR /&gt; (IppiPyramidUpState_32f_C1R*) &amp;amp;(lPyr-&amp;gt;pState);&lt;BR /&gt; Ipp32f **gImage = (Ipp32f**)(gPyr-&amp;gt;pImage);&lt;BR /&gt; Ipp32f **lImage = (Ipp32f**)(lPyr-&amp;gt;pImage);&lt;BR /&gt; IppiSize *pRoi = dPyr-&amp;gt;pRoi;&lt;BR /&gt; int *gStep = gPyr-&amp;gt;pStep;&lt;BR /&gt; int *lStep = lPyr-&amp;gt;pStep;&lt;BR /&gt; int level = gPyr-&amp;gt;level;&lt;BR /&gt; Ipp32f *ptr;&lt;BR /&gt; int step;&lt;BR /&gt; // allocate structures to calculate pyramid layers&lt;BR /&gt; ippiPyramidLayerDownInitAlloc_32f_C1R(gState, srcRoi, rate, pKernel,&lt;BR /&gt;&amp;amp;n
bsp; kerSize, IPPI_INTER_LINEAR);&lt;BR /&gt; ippiPyramidLayerUpInitAlloc_32f_C1R (lState, srcRoi, rate, pKernel,&lt;BR /&gt; kerSize, IPPI_INTER_LINEAR);&lt;BR /&gt;// build Gaussian pyramid with level+1 layers&lt;BR /&gt; gImage[0] = pSrc;&lt;BR /&gt; gStep[0] = srcStep;&lt;BR /&gt; for (i=1; i&amp;lt;=level; i++) {&lt;BR /&gt; gImage&lt;I&gt; = ippiMalloc_32f_C1(pRoi&lt;I&gt;.width,pRoi&lt;I&gt;.height,gStep+i);&lt;BR /&gt; ippiPyramidLayerDown_32f_C1R(gImage[i-1], gStep[i-1], pRoi[i-1], &lt;BR /&gt; gImage&lt;I&gt;, gStep&lt;I&gt;, pRoi&lt;I&gt;, *gState);&lt;BR /&gt; } &lt;BR /&gt;  // build Laplacian pyramid with level layers&lt;BR /&gt; ptr = ippiMalloc_32f_C1(srcRoi.width,srcRoi.height,&amp;amp;step);&lt;BR /&gt; for (i=level-1; i&amp;gt;=0; i--) {&lt;BR /&gt; lImage&lt;I&gt; = ippiMalloc_32f_C1(pRoi&lt;I&gt;.width,pRoi&lt;I&gt;.height,gStep+i);&lt;BR /&gt; ippiPyramidLayerUp_32f_C1R(gImage[i+1], gStep[i+1], pRoi[i+1], &lt;BR /&gt; ptr, step, pRoi&lt;I&gt;, *lState);&lt;BR /&gt; ippiSub_32f_C1R(ptr, step, gImage&lt;I&gt;, gStep&lt;I&gt;,&lt;BR /&gt; lImage&lt;I&gt;, lStep&lt;I&gt;, pRoi&lt;I&gt;);&lt;BR /&gt; } &lt;BR /&gt; ippiFree(ptr);&lt;BR /&gt; ippiPyramidLayerDownFree_32f_C1R(*gStep);&lt;BR /&gt; ippiPyramidLayerUpFree_32f_C1R (*lStep);&lt;BR /&gt;// use Gaussian and Laplacian pyramids&lt;BR /&gt;// free allocated images&lt;BR /&gt; for (i=1; i&amp;lt;=level; i++) {&lt;BR /&gt; ippiFree(gImage&lt;I&gt;);&lt;BR /&gt; ippiFree(lImage[i-1]);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;// free pyramid structures&lt;BR /&gt; ippiPyramidFree (gPyr);&lt;BR /&gt; ippiPyramidFree (lPyr);&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Here are the error codes, using the Intel compiler version as of yesterday (10.3.somethingorother) and the IPP from the same day. MKL is also included, but I don't see how that could interfere. There are just some obvious bugs here (dPyr?); I'm not familiar 
enough with these libraries yet to make the necessary fixes, and any help would be appreciated. Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;icl: warning #10210: problem with Microsoft compilation of 'C:source\_dllImageOperationsCGaussianPyramids.cpp'&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(257): error: a value of type "IppiPyramidDownState_32f_C1R *" cannot be used to initialize an entity of type "IppiPyramidDownState_32f_C1R **"&lt;BR /&gt; (IppiPyramidDownState_32f_C1R*)&amp;amp;(gPyr-&amp;gt;pState);&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(259): error: a value of type "IppiPyramidUpState_32f_C1R *" cannot be used to initialize an entity of type "IppiPyramidUpState_32f_C1R **"&lt;BR /&gt; (IppiPyramidUpState_32f_C1R*) &amp;amp;(lPyr-&amp;gt;pState);&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(262): error: identifier "dPyr" is undefined&lt;BR /&gt; IppiSize *pRoi = dPyr-&amp;gt;pRoi;&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(269): error: identifier "pKernel" is undefined&lt;BR /&gt; ippiPyramidLayerDownInitAlloc_32f_C1R(gState, srcRoi, rate, pKernel,&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(270): error: identifier "kerSize" is undefined&lt;BR /&gt; kerSize, IPPI_INTER_LINEAR);&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(274): error: identifier "pSrc" is undefined&lt;BR /&gt; gImage[0] = pSrc;&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(275): error: identifier "srcStep" is undefined&lt;BR /&gt;&amp;amp;n
bsp; gStep[0] = srcStep;&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(291): error: argument of type "int" is incompatible with parameter of type "IppiPyramidDownState_32f_C1R *"&lt;BR /&gt; ippiPyramidLayerDownFree_32f_C1R(*gStep);&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(292): error: argument of type "int" is incompatible with parameter of type "IppiPyramidUpState_32f_C1R *"&lt;BR /&gt; ippiPyramidLayerUpFree_32f_C1R (*lStep);&lt;BR /&gt; ^&lt;BR /&gt;compilation aborted for C:source\_dllImageOperationsCGaussianPyramids.cpp (code 2)&lt;BR /&gt;Error executing xicl6.exe.&lt;BR /&gt;&lt;BR /&gt;ImageOperations.dll - 9 error(s), 1 warning(s)&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 06 Aug 2008 01:25:14 GMT</pubDate>
    <dc:creator>mmroden</dc:creator>
    <dc:date>2008-08-06T01:25:14Z</dc:date>
    <item>
      <title>Sample code doesn't compile</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sample-code-doesn-t-compile/m-p/907852#M13757</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I'm trying to get the gaussian/laplacian code to work, and the provided code in the documentation is very broken. I don't know how to fix it (I've been using the IPP for two days now), and any obvious help to fix the documentation would be helpful.&lt;BR /&gt;&lt;BR /&gt;In my application, we take an image down from roughly 4000x4000 to 1x1 and build it back up again, using 12 decomposition levels. I wanted to use the provided gaussian functions, but they break at about the fourth level down, simply because they hit into an odd/even bug (ie, the subsampled image has an even index, the upsampled image needs an odd index, and the default code (_Gauss5x5) won't allow for that). So, I started to use the more generic pyramid coding.&lt;BR /&gt;&lt;BR /&gt;Turns out, the sample code for that is just broken as is, and won't compile.&lt;BR /&gt;&lt;BR /&gt;Here's the sample code from the documentation, p14-69 of ippiman.pdf. I've added the srcRoi IppiSize structure, because I figure that part's right, as well as the 'rate' parameter. I haven't set the Kernel yet; I wanted to get the error count to something manageable before I implement the kernel. I was going to use a float array for pSrc, but I think I really need it to be of type Ipp32f* instead; that's something with which I can experiment.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;BR /&gt; IppiPyramid *gPyr; // pointer to Gaussian pyramid structure&lt;BR /&gt; IppiPyramid *lPyr; // pointer to Laplacian pyramid structure&lt;BR /&gt;// allocate pyramid structures&lt;BR /&gt; IppiSize srcRoi = {theColumns, theRows};&lt;BR /&gt; float rate = 2.0f; //decrease by 2 each time&lt;BR /&gt; ippiPyramidInitAlloc (&amp;amp;gPyr, 1000, srcRoi, rate);&lt;BR /&gt; ippiPyramidInitAlloc (&amp;amp;lPyr, 1000, srcRoi, rate);&lt;BR /&gt; {&lt;BR /&gt; IppiPyramidDownState_32f_C1R **gState =&lt;BR /&gt; (IppiPyramidDownState_32f_C1R*)&amp;amp;(gPyr-&amp;gt;pState);&lt;BR /&gt; IppiPyramidUpState_32f_C1R **lState = &lt;BR /&gt; (IppiPyramidUpState_32f_C1R*) &amp;amp;(lPyr-&amp;gt;pState);&lt;BR /&gt; Ipp32f **gImage = (Ipp32f**)(gPyr-&amp;gt;pImage);&lt;BR /&gt; Ipp32f **lImage = (Ipp32f**)(lPyr-&amp;gt;pImage);&lt;BR /&gt; IppiSize *pRoi = dPyr-&amp;gt;pRoi;&lt;BR /&gt; int *gStep = gPyr-&amp;gt;pStep;&lt;BR /&gt; int *lStep = lPyr-&amp;gt;pStep;&lt;BR /&gt; int level = gPyr-&amp;gt;level;&lt;BR /&gt; Ipp32f *ptr;&lt;BR /&gt; int step;&lt;BR /&gt; // allocate structures to calculate pyramid layers&lt;BR /&gt; ippiPyramidLayerDownInitAlloc_32f_C1R(gState, srcRoi, rate, pKernel,&lt;BR /&gt;&amp;amp;n
bsp; kerSize, IPPI_INTER_LINEAR);&lt;BR /&gt; ippiPyramidLayerUpInitAlloc_32f_C1R (lState, srcRoi, rate, pKernel,&lt;BR /&gt; kerSize, IPPI_INTER_LINEAR);&lt;BR /&gt;// build Gaussian pyramid with level+1 layers&lt;BR /&gt; gImage[0] = pSrc;&lt;BR /&gt; gStep[0] = srcStep;&lt;BR /&gt; for (i=1; i&amp;lt;=level; i++) {&lt;BR /&gt; gImage&lt;I&gt; = ippiMalloc_32f_C1(pRoi&lt;I&gt;.width,pRoi&lt;I&gt;.height,gStep+i);&lt;BR /&gt; ippiPyramidLayerDown_32f_C1R(gImage[i-1], gStep[i-1], pRoi[i-1], &lt;BR /&gt; gImage&lt;I&gt;, gStep&lt;I&gt;, pRoi&lt;I&gt;, *gState);&lt;BR /&gt; } &lt;BR /&gt;  // build Laplacian pyramid with level layers&lt;BR /&gt; ptr = ippiMalloc_32f_C1(srcRoi.width,srcRoi.height,&amp;amp;step);&lt;BR /&gt; for (i=level-1; i&amp;gt;=0; i--) {&lt;BR /&gt; lImage&lt;I&gt; = ippiMalloc_32f_C1(pRoi&lt;I&gt;.width,pRoi&lt;I&gt;.height,gStep+i);&lt;BR /&gt; ippiPyramidLayerUp_32f_C1R(gImage[i+1], gStep[i+1], pRoi[i+1], &lt;BR /&gt; ptr, step, pRoi&lt;I&gt;, *lState);&lt;BR /&gt; ippiSub_32f_C1R(ptr, step, gImage&lt;I&gt;, gStep&lt;I&gt;,&lt;BR /&gt; lImage&lt;I&gt;, lStep&lt;I&gt;, pRoi&lt;I&gt;);&lt;BR /&gt; } &lt;BR /&gt; ippiFree(ptr);&lt;BR /&gt; ippiPyramidLayerDownFree_32f_C1R(*gStep);&lt;BR /&gt; ippiPyramidLayerUpFree_32f_C1R (*lStep);&lt;BR /&gt;// use Gaussian and Laplacian pyramids&lt;BR /&gt;// free allocated images&lt;BR /&gt; for (i=1; i&amp;lt;=level; i++) {&lt;BR /&gt; ippiFree(gImage&lt;I&gt;);&lt;BR /&gt; ippiFree(lImage[i-1]);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;// free pyramid structures&lt;BR /&gt; ippiPyramidFree (gPyr);&lt;BR /&gt; ippiPyramidFree (lPyr);&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Here are the error codes, using the Intel compiler version as of yesterday (10.3.somethingorother) and the IPP from the same day. MKL is also included, but I don't see how that could interfere. There are just some obvious bugs here (dPyr?); I'm not familiar 
enough with these libraries yet to make the necessary fixes, and any help would be appreciated. Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;icl: warning #10210: problem with Microsoft compilation of 'C:source\_dllImageOperationsCGaussianPyramids.cpp'&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(257): error: a value of type "IppiPyramidDownState_32f_C1R *" cannot be used to initialize an entity of type "IppiPyramidDownState_32f_C1R **"&lt;BR /&gt; (IppiPyramidDownState_32f_C1R*)&amp;amp;(gPyr-&amp;gt;pState);&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(259): error: a value of type "IppiPyramidUpState_32f_C1R *" cannot be used to initialize an entity of type "IppiPyramidUpState_32f_C1R **"&lt;BR /&gt; (IppiPyramidUpState_32f_C1R*) &amp;amp;(lPyr-&amp;gt;pState);&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(262): error: identifier "dPyr" is undefined&lt;BR /&gt; IppiSize *pRoi = dPyr-&amp;gt;pRoi;&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(269): error: identifier "pKernel" is undefined&lt;BR /&gt; ippiPyramidLayerDownInitAlloc_32f_C1R(gState, srcRoi, rate, pKernel,&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(270): error: identifier "kerSize" is undefined&lt;BR /&gt; kerSize, IPPI_INTER_LINEAR);&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(274): error: identifier "pSrc" is undefined&lt;BR /&gt; gImage[0] = pSrc;&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(275): error: identifier "srcStep" is undefined&lt;BR /&gt;&amp;amp;n
bsp; gStep[0] = srcStep;&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(291): error: argument of type "int" is incompatible with parameter of type "IppiPyramidDownState_32f_C1R *"&lt;BR /&gt; ippiPyramidLayerDownFree_32f_C1R(*gStep);&lt;BR /&gt; ^&lt;BR /&gt;C:source\_dllImageOperationsCGaussianPyramids.cpp(292): error: argument of type "int" is incompatible with parameter of type "IppiPyramidUpState_32f_C1R *"&lt;BR /&gt; ippiPyramidLayerUpFree_32f_C1R (*lStep);&lt;BR /&gt; ^&lt;BR /&gt;compilation aborted for C:source\_dllImageOperationsCGaussianPyramids.cpp (code 2)&lt;BR /&gt;Error executing xicl6.exe.&lt;BR /&gt;&lt;BR /&gt;ImageOperations.dll - 9 error(s), 1 warning(s)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Aug 2008 01:25:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sample-code-doesn-t-compile/m-p/907852#M13757</guid>
      <dc:creator>mmroden</dc:creator>
      <dc:date>2008-08-06T01:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sample code doesn't compile</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sample-code-doesn-t-compile/m-p/907853#M13758</link>
      <description>&lt;P&gt;Please submit your issue report to &lt;A href="http://premier.intel.com"&gt;Intel Premier Support&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Vladimir&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2008 16:40:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sample-code-doesn-t-compile/m-p/907853#M13758</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-08-07T16:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sample code doesn't compile</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sample-code-doesn-t-compile/m-p/907854#M13759</link>
      <description>I'm trying, but I keep getting redirected to this error page:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://welcome.intel.com/scripts-util/500.asp?aspxerrorpath=/Login.aspx" target="_blank"&gt;https://welcome.intel.com/scripts-util/500.asp?aspxerrorpath=/Login.aspx&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Aug 2008 18:08:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sample-code-doesn-t-compile/m-p/907854#M13759</guid>
      <dc:creator>mmroden</dc:creator>
      <dc:date>2008-08-07T18:08:45Z</dc:date>
    </item>
  </channel>
</rss>

