<?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 Re: memory alignment uncertainties in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/memory-alignment-uncertainties/m-p/945597#M18117</link>
    <description>&lt;DIV&gt;Hi,&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;1) It is better to use 16-bytes aligned memory blocks (or even 32-bytes aligned) just for performance reasons on modernprocessors. So, IPP does contains wrappers functions for malloc which do return aligned memory blocks. But it is possible to use even not aligned memory in IPP - only performance will suffer from it.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;2) I belive it is safe to use memory allocated with CreateDIBSection call. If there were any problems with that - the world should definetely know about it already.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Regards,&lt;/DIV&gt;
&lt;DIV&gt; Vladimir&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 03 Aug 2004 15:42:33 GMT</pubDate>
    <dc:creator>Vladimir_Dudnik</dc:creator>
    <dc:date>2004-08-03T15:42:33Z</dc:date>
    <item>
      <title>memory alignment uncertainties</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/memory-alignment-uncertainties/m-p/945596#M18116</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Hi&lt;/DIV&gt;
&lt;DIV&gt;Following my initial experiments with the IPP I'd like to tie down some uncertainties about the default alignment of system memory allocation calls. I'm working in 32 bit windows.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;1) malloc(). As far as I can tell, as it would not seem to be documented,the MS malloc will allocate using 16bit alignment.&lt;/DIV&gt;
&lt;DIV&gt;Is that enough for all SIMD instructions?&lt;/DIV&gt;
&lt;DIV&gt;In a separate thread I see&lt;/DIV&gt;
&lt;BLOCKQUOTE dir="ltr"&gt;
&lt;P&gt;"currently we have just wrappers for C run time malloc/free, with adding allocation of aligned memory blocks...."&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;DIV&gt;which implies that it isn't?&lt;/DIV&gt;
&lt;DIV&gt;But when I look at the &lt;FONT size="2"&gt;iPPiSample file ithas the function "void CIppiImage::AllocateData() " that appears to use "malloc()" to allocate bitmaps. So it doesn't use a wrapper? Is it "walking wounded"?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;But on the other hand, the ProcessorPack for VS6 adds the aligned versions of malloc().&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;Someone please explain the apparent "contradictions".&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;2) CreateDibSection(). I have no idea how this might allocate memory for DIBs. Is is always safe to use it? [Somehow I imagine it must be or the graphics drivers would break even if the user code did no SIMD work?]&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;Thanks&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;Dave Turnbull&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Aug 2004 04:50:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/memory-alignment-uncertainties/m-p/945596#M18116</guid>
      <dc:creator>Deleted_U_Intel</dc:creator>
      <dc:date>2004-08-03T04:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: memory alignment uncertainties</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/memory-alignment-uncertainties/m-p/945597#M18117</link>
      <description>&lt;DIV&gt;Hi,&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;1) It is better to use 16-bytes aligned memory blocks (or even 32-bytes aligned) just for performance reasons on modernprocessors. So, IPP does contains wrappers functions for malloc which do return aligned memory blocks. But it is possible to use even not aligned memory in IPP - only performance will suffer from it.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;2) I belive it is safe to use memory allocated with CreateDIBSection call. If there were any problems with that - the world should definetely know about it already.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Regards,&lt;/DIV&gt;
&lt;DIV&gt; Vladimir&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Aug 2004 15:42:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/memory-alignment-uncertainties/m-p/945597#M18117</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2004-08-03T15:42:33Z</dc:date>
    </item>
  </channel>
</rss>

