<?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 ippiMalloc problem in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiMalloc-problem/m-p/765885#M188</link>
    <description>Hi there, i'm trouble with ippiMalloc_32f_C1 i'm allocating memory like that ;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;int r_step;&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV&gt;Ipp32f *imgResult = ippiMalloc_32f_C1(621, 471, &amp;amp;r_step);&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;//rstep is2496&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;and then i'm setting all values to 100 with ippiSet;&lt;/DIV&gt;&lt;DIV&gt;IppiSize ttsize = {621,471};&lt;/DIV&gt;&lt;DIV&gt;ippiSet_32f_C1R(100,imgResult,r_step,ttsize);&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;and then trying to reach some memory location like that;&lt;/DIV&gt;&lt;DIV&gt;float trouble= *(imgResult+(620+r_step*470)); //last pixel on the image ... if r_step is bigger than 118 going to exception ..&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;is there any problem with my way to reach memory location ?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I tested something with 4x4 array and working well with step is equal to 32 ;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;	int an;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;	IppiSize tsize = {4,4};&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;	Ipp8u * test = ippiMalloc_8u_C1(tsize.width,tsize.height,&amp;amp;an); //an equal to 32&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;	ippiSet_8u_C1R(0,test,an,tsize);&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;unsigned char fine = *(test+(3+an*3)); // last value on the array is equal to 0 working fine ...&lt;/DIV&gt;</description>
    <pubDate>Mon, 13 Dec 2010 09:11:12 GMT</pubDate>
    <dc:creator>trlinux</dc:creator>
    <dc:date>2010-12-13T09:11:12Z</dc:date>
    <item>
      <title>ippiMalloc problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiMalloc-problem/m-p/765885#M188</link>
      <description>Hi there, i'm trouble with ippiMalloc_32f_C1 i'm allocating memory like that ;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;int r_step;&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV&gt;Ipp32f *imgResult = ippiMalloc_32f_C1(621, 471, &amp;amp;r_step);&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;//rstep is2496&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;and then i'm setting all values to 100 with ippiSet;&lt;/DIV&gt;&lt;DIV&gt;IppiSize ttsize = {621,471};&lt;/DIV&gt;&lt;DIV&gt;ippiSet_32f_C1R(100,imgResult,r_step,ttsize);&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;and then trying to reach some memory location like that;&lt;/DIV&gt;&lt;DIV&gt;float trouble= *(imgResult+(620+r_step*470)); //last pixel on the image ... if r_step is bigger than 118 going to exception ..&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;is there any problem with my way to reach memory location ?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I tested something with 4x4 array and working well with step is equal to 32 ;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;	int an;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;	IppiSize tsize = {4,4};&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;	Ipp8u * test = ippiMalloc_8u_C1(tsize.width,tsize.height,&amp;amp;an); //an equal to 32&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;	ippiSet_8u_C1R(0,test,an,tsize);&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;unsigned char fine = *(test+(3+an*3)); // last value on the array is equal to 0 working fine ...&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Dec 2010 09:11:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiMalloc-problem/m-p/765885#M188</guid>
      <dc:creator>trlinux</dc:creator>
      <dc:date>2010-12-13T09:11:12Z</dc:date>
    </item>
    <item>
      <title>ippiMalloc problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiMalloc-problem/m-p/765886#M189</link>
      <description>Hi,&lt;BR /&gt;the ippiMalloc* functions return parameter 'step' in bytes. So right code to reach the last pixel is:&lt;BR /&gt;&lt;SPAN style="color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="color: #0000ff; font-size: x-small;"&gt;float&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: x-small;"&gt; trouble= *(imgResult+(620+r_step/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="color: #0000ff; font-size: x-small;"&gt;sizeof&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: x-small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="color: #0000ff; font-size: x-small;"&gt;float&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: x-small;"&gt;)*470));&lt;BR /&gt;// not forget to free memory&lt;BR /&gt;&lt;P&gt;ippiFree(imgResult);&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Albert&lt;/P&gt;&lt;/SPAN&gt;</description>
      <pubDate>Mon, 13 Dec 2010 11:26:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiMalloc-problem/m-p/765886#M189</guid>
      <dc:creator>Albert_Stepanov</dc:creator>
      <dc:date>2010-12-13T11:26:43Z</dc:date>
    </item>
    <item>
      <title>ippiMalloc problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiMalloc-problem/m-p/765887#M190</link>
      <description>Thanks Albert ...</description>
      <pubDate>Mon, 13 Dec 2010 12:38:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiMalloc-problem/m-p/765887#M190</guid>
      <dc:creator>trlinux</dc:creator>
      <dc:date>2010-12-13T12:38:37Z</dc:date>
    </item>
  </channel>
</rss>

