<?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: Aligning addresses at 16-byte boundaries in c++ in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Aligning-addresses-at-16-byte-boundaries-in-c/m-p/911217#M12168</link>
    <description>new() supports 16-byte alignment on the 64-bit operating system/library combinationss supported by MKL. Regrettably ugly or non-portable methods are needed on 32-bit OS. Usually recommended are the _mm_malloc() or aligned_malloc() functions specific to your compiler. I'm downloading the current MKL in hopes of figuring out where you got your example. Until I see it, I'm skeptical that you got it from MKL docs.&lt;BR /&gt;</description>
    <pubDate>Tue, 04 Sep 2007 01:10:11 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2007-09-04T01:10:11Z</dc:date>
    <item>
      <title>Aligning addresses at 16-byte boundaries in c++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Aligning-addresses-at-16-byte-boundaries-in-c/m-p/911216#M12167</link>
      <description>Hello,&lt;BR /&gt;On page 8-2 of the MKL for Linux User's Guide, there is some tips for better performance with memory alignment. I tried the tip for C using malloc in my c++ code but get the following error:&lt;BR /&gt;&lt;BR /&gt;test.cpp(36): error: expression must be a pointer to a complete object type a[i*SIZE+j]= static_cast&lt;DOUBLE&gt;(i+j);&lt;BR /&gt;&lt;BR /&gt;Is there some c++ correct way to make this memory allocation and alignment (e.g., using new)?&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;/DOUBLE&gt;</description>
      <pubDate>Mon, 03 Sep 2007 19:33:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Aligning-addresses-at-16-byte-boundaries-in-c/m-p/911216#M12167</guid>
      <dc:creator>afinley</dc:creator>
      <dc:date>2007-09-03T19:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning addresses at 16-byte boundaries in c++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Aligning-addresses-at-16-byte-boundaries-in-c/m-p/911217#M12168</link>
      <description>new() supports 16-byte alignment on the 64-bit operating system/library combinationss supported by MKL. Regrettably ugly or non-portable methods are needed on 32-bit OS. Usually recommended are the _mm_malloc() or aligned_malloc() functions specific to your compiler. I'm downloading the current MKL in hopes of figuring out where you got your example. Until I see it, I'm skeptical that you got it from MKL docs.&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Sep 2007 01:10:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Aligning-addresses-at-16-byte-boundaries-in-c/m-p/911217#M12168</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2007-09-04T01:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning addresses at 16-byte boundaries in c++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Aligning-addresses-at-16-byte-boundaries-in-c/m-p/911218#M12169</link>
      <description>Thanks for the note back. The page number (8-2) and code that I referenced is in a recent user's guide (on-line here: &lt;A href="http://www.osc.edu/hpc/manuals/INTEL08082007/mkl/9.1/doc/userguide.pdf)" target="_blank"&gt;http://www.osc.edu/hpc/manuals/INTEL08082007/mkl/9.1/doc/userguide.pdf)&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I am using a 64-bit OS with MKL supported processor, etc. So in this case, does new() automatically do the 16-byte alignment? Or do I need to do something else? I haven't had any luck with google searches on this topic (other than the malloc functions you note above).&lt;BR /&gt;&lt;BR /&gt;Thanks again for your help!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Sep 2007 02:35:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Aligning-addresses-at-16-byte-boundaries-in-c/m-p/911218#M12169</guid>
      <dc:creator>afinley</dc:creator>
      <dc:date>2007-09-04T02:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning addresses at 16-byte boundaries in c++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Aligning-addresses-at-16-byte-boundaries-in-c/m-p/911219#M12170</link>
      <description>&lt;A href="http://www.x86-64.org/documentation/abi.pdf"&gt;http://www.x86-64.org/documentation/abi.pdf&lt;/A&gt;&lt;BR /&gt;refers to&lt;BR /&gt;&lt;A href="http://www.codesourcery.com/cxx-abi/abi.html"&gt;http://www.codesourcery.com/cxx-abi/abi.html&lt;/A&gt;&lt;BR /&gt;but all I find there is that new[] must return "natural alignment."&lt;BR /&gt;In
another place in this reference, there is a bunch of legalese about new[] alignment which
seems as if it could boil down to 8 bytes, if sizeof(size_t) is 8&lt;BR /&gt;It
wouldn't hurt to check a number of examples to verify that it is
16-byte alignment. Both x86-64 and ia64 linux do depend in many cases
on 16-byte alignment for important optimizations.&lt;BR /&gt;Also, there are last year's C++ standardization proposals on alignment:&lt;BR /&gt;&lt;A&gt;&lt;FONT size="-1"&gt;&lt;SPAN class="a"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;A&gt;&lt;FONT size="-1"&gt;&lt;SPAN class="a"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size="-1"&gt;&lt;A&gt;www.open-std.org/jtc1/sc22/&lt;/A&gt;&lt;A&gt;wg21/docs/papers/2006/n2140.pdf&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;The
example you refer to outlines too sketchily what _mm_malloc() and
_mm_free() do in a 32-bit compiler library. I didn't find it in the
current .pdf which comes with MKL.&lt;BR /&gt;&lt;BR /&gt;I've asked some experts for verification that 64-bit new[] must produce 16-byte
alignments (at least, as one reference said, for objects of 16 bytes or
more), but the answer doesn't appear to be documented clearly.&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Sep 2007 16:04:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Aligning-addresses-at-16-byte-boundaries-in-c/m-p/911219#M12170</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2007-09-04T16:04:23Z</dc:date>
    </item>
  </channel>
</rss>

