<?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 thank you le g. and in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Haswell-TSX-using-RTM-beginner-student/m-p/1039265#M6733</link>
    <description>&lt;P&gt;thank you le g. and jimdempseyatthecove when i put the printf function after the _xend the transaction works. thanks again for your quick help&lt;/P&gt;</description>
    <pubDate>Sun, 15 Jun 2014 17:57:45 GMT</pubDate>
    <dc:creator>tshan_k_</dc:creator>
    <dc:date>2014-06-15T17:57:45Z</dc:date>
    <item>
      <title>Haswell TSX using RTM (beginner student)</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Haswell-TSX-using-RTM-beginner-student/m-p/1039262#M6730</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am just getting introduced into haswell's TSX infrastructure using RTM. I have downloaded the rtm.h header files from online and i tried producing a simple counter. Unfortunately every time i compile and run the program, the _xbegin function does not execute the transaction inside. &amp;nbsp;I would be greatly appreciated for your help. thanks&lt;/P&gt;

&lt;P class="p1"&gt;#include &lt;SPAN class="s1"&gt;&amp;lt;stdio.h&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;#include &lt;/SPAN&gt;&amp;lt;stdlib.h&amp;gt;&lt;/P&gt;

&lt;P class="p1"&gt;#include &lt;SPAN class="s1"&gt;"rtm.h"&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p2"&gt;&lt;SPAN class="s3" style="font-size: 1em; line-height: 1.5;"&gt;void&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt; main()&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p4"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;SPAN class="s3"&gt;int&lt;/SPAN&gt; N=&lt;SPAN class="s4"&gt;5&lt;/SPAN&gt;;&lt;/P&gt;

&lt;P class="p4"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s3" style="font-size: 1em; line-height: 1.5;"&gt;int&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt; i;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p4"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;SPAN class="s3"&gt;int&lt;/SPAN&gt; status;&lt;/P&gt;

&lt;P class="p4"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;SPAN class="s3"&gt;int&lt;/SPAN&gt; counter = &lt;SPAN class="s4"&gt;0&lt;/SPAN&gt;;&lt;/P&gt;

&lt;P class="p3"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp; &amp;nbsp; status = _xbegin();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;if&lt;/SPAN&gt; (status == _XBEGIN_STARTED)&lt;/P&gt;

&lt;P class="p4"&gt;{&lt;/P&gt;

&lt;P class="p4"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;SPAN class="s3"&gt;for&lt;/SPAN&gt; (i=&lt;SPAN class="s4"&gt;0&lt;/SPAN&gt;; i&amp;lt;N ; i++)&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p4"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;counter++;&lt;/P&gt;

&lt;P class="p2"&gt;&lt;SPAN class="s5"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;printf(&lt;/SPAN&gt;"counter value: %d\n"&lt;SPAN class="s5"&gt;, counter);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p4"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;

&lt;P class="p4"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp; &amp;nbsp; _xend();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p4"&gt;}&lt;/P&gt;

&lt;P class="p3"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;

&lt;P class="p5"&gt;else&lt;/P&gt;

&lt;P class="p3"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;

&lt;P class="p2"&gt;&lt;SPAN class="s5"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;printf(&lt;/SPAN&gt;"did not work\n"&lt;SPAN class="s5"&gt;);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p2"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2014 14:42:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Haswell-TSX-using-RTM-beginner-student/m-p/1039262#M6730</guid>
      <dc:creator>tshan_k_</dc:creator>
      <dc:date>2014-06-12T14:42:08Z</dc:date>
    </item>
    <item>
      <title>You should not use print</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Haswell-TSX-using-RTM-beginner-student/m-p/1039263#M6731</link>
      <description>&lt;P&gt;You should not use print inside a transactional&amp;nbsp;region. I/O is &amp;nbsp;unfriendly&amp;nbsp;instruction. When the transaction&amp;nbsp;is aborted, &amp;nbsp;the program goes to the else statement.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jun 2014 03:07:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Haswell-TSX-using-RTM-beginner-student/m-p/1039263#M6731</guid>
      <dc:creator>le_g_1</dc:creator>
      <dc:date>2014-06-14T03:07:55Z</dc:date>
    </item>
    <item>
      <title>FWIW placing a break point</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Haswell-TSX-using-RTM-beginner-student/m-p/1039264#M6732</link>
      <description>&lt;P&gt;FWIW placing a break point inside a transactional region will abort the transaction. Debug your code as a critical section, then convert to TSX or RTM.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jun 2014 02:17:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Haswell-TSX-using-RTM-beginner-student/m-p/1039264#M6732</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2014-06-15T02:17:28Z</dc:date>
    </item>
    <item>
      <title>thank you le g. and</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Haswell-TSX-using-RTM-beginner-student/m-p/1039265#M6733</link>
      <description>&lt;P&gt;thank you le g. and jimdempseyatthecove when i put the printf function after the _xend the transaction works. thanks again for your quick help&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jun 2014 17:57:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Haswell-TSX-using-RTM-beginner-student/m-p/1039265#M6733</guid>
      <dc:creator>tshan_k_</dc:creator>
      <dc:date>2014-06-15T17:57:45Z</dc:date>
    </item>
  </channel>
</rss>

