<?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 Memory fences in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Memory-fences/m-p/803053#M686</link>
    <description>asm volatile("":::"memory"); merely prevents the compiler's optimizer from rearranging your code --- reads and writes that appear in source before that asm block must appear as CPU instructions before that asm block, and reads and writes that appear in source after that asm block must appear as CPU instructions after that asm block. The CPU may still reorder these reads and writes, and they may become visible to other CPUs in the system out of order (but constrained by the CPU memory model).&lt;BR /&gt;&lt;BR /&gt;__sync_synchronize() will generate a suitable CPU instruction to generate a memory fence. On Intel CPUs this may be an MFENCE instruction, or a LOCKed instruction such as XCHG. This has the additional consequence of imposing visibility constraints on the memory accesses at the CPU level.&lt;BR /&gt;</description>
    <pubDate>Mon, 20 Jun 2011 11:44:20 GMT</pubDate>
    <dc:creator>anthony_williams</dc:creator>
    <dc:date>2011-06-20T11:44:20Z</dc:date>
    <item>
      <title>Memory fences</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Memory-fences/m-p/803052#M685</link>
      <description>Hello, &lt;BR /&gt;&lt;BR /&gt;Just a quick question regarding memory fences in C.&lt;BR /&gt;What exactly is the difference (if any) between:&lt;BR /&gt;__sync_synchronize();&lt;BR /&gt;asm volatile("":::"memory");&lt;BR /&gt;</description>
      <pubDate>Sat, 18 Jun 2011 14:52:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Memory-fences/m-p/803052#M685</guid>
      <dc:creator>Tudor</dc:creator>
      <dc:date>2011-06-18T14:52:55Z</dc:date>
    </item>
    <item>
      <title>Memory fences</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Memory-fences/m-p/803053#M686</link>
      <description>asm volatile("":::"memory"); merely prevents the compiler's optimizer from rearranging your code --- reads and writes that appear in source before that asm block must appear as CPU instructions before that asm block, and reads and writes that appear in source after that asm block must appear as CPU instructions after that asm block. The CPU may still reorder these reads and writes, and they may become visible to other CPUs in the system out of order (but constrained by the CPU memory model).&lt;BR /&gt;&lt;BR /&gt;__sync_synchronize() will generate a suitable CPU instruction to generate a memory fence. On Intel CPUs this may be an MFENCE instruction, or a LOCKed instruction such as XCHG. This has the additional consequence of imposing visibility constraints on the memory accesses at the CPU level.&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Jun 2011 11:44:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Memory-fences/m-p/803053#M686</guid>
      <dc:creator>anthony_williams</dc:creator>
      <dc:date>2011-06-20T11:44:20Z</dc:date>
    </item>
  </channel>
</rss>

