<?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 Reference for C++11 support in offloaded code in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/952999#M20045</link>
    <description>&lt;P&gt;Is there a reference someplace which documents what features of C++11 are supported in offloaded code? &amp;nbsp;It appears to me that std::thread::yield and std::map::emplace are not supported, but it would be good to have a comprehensive list.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Mar 2014 13:42:33 GMT</pubDate>
    <dc:creator>John_F_1</dc:creator>
    <dc:date>2014-03-19T13:42:33Z</dc:date>
    <item>
      <title>Reference for C++11 support in offloaded code</title>
      <link>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/952999#M20045</link>
      <description>&lt;P&gt;Is there a reference someplace which documents what features of C++11 are supported in offloaded code? &amp;nbsp;It appears to me that std::thread::yield and std::map::emplace are not supported, but it would be good to have a comprehensive list.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2014 13:42:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/952999#M20045</guid>
      <dc:creator>John_F_1</dc:creator>
      <dc:date>2014-03-19T13:42:33Z</dc:date>
    </item>
    <item>
      <title>Did you read the section in</title>
      <link>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953000#M20046</link>
      <description>&lt;P&gt;Did you read the section in the release notes?&lt;/P&gt;

&lt;P&gt;Features from C++11 (-std=c++11)&lt;BR /&gt;
	o Complete (instead of partial) implementation of initializer lists. See N2672 and&lt;BR /&gt;
	N3217.&lt;BR /&gt;
	o Complete implementation of inline namespaces. See N2535.&lt;BR /&gt;
	o Complete implementation of non-static data member initializers. See N2756.&lt;BR /&gt;
	o Complete implementation of generalized constant expressions. See N2235.&lt;BR /&gt;
	o Complete implementation of unrestricted unions. See N2544.&lt;BR /&gt;
	o Delegating constructors. See N1986.&lt;BR /&gt;
	o Rvalue references for *this. See N2439.&lt;BR /&gt;
	o Raw string literals. See N2442.&lt;BR /&gt;
	o Conversions of lambdas to function pointers.&lt;BR /&gt;
	o Implicit move constructors and assignment operators. See N3053.&lt;BR /&gt;
	o __bases and __direct_bases type traits.&lt;BR /&gt;
	o The context-sensitive keyword "final" can now be used on a class definition, and&lt;BR /&gt;
	"final" and "override" can be used on member function declarations. See N2928,&lt;BR /&gt;
	N3206, and N3272.&lt;BR /&gt;
	o Complete implementation of the "noexcept" specifier and operator. See&lt;/P&gt;

&lt;P&gt;If you're looking for deficiency reports about which things may not always work in offload mode, I don't know a solution other than to ask specific questions here or in a problem report.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2014 14:07:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953000#M20046</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-03-19T14:07:59Z</dc:date>
    </item>
    <item>
      <title>Thanks for the pointer to the</title>
      <link>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953001#M20047</link>
      <description>&lt;P&gt;Thanks for the pointer to the release notes. &amp;nbsp;I was hoping for something along the lines of this table:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler" target="_blank"&gt;http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;But even this table lacks details of the additions to the STL and the thread support library which are definitely supported on windows but seem to be missing on the MIC.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2014 14:24:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953001#M20047</guid>
      <dc:creator>John_F_1</dc:creator>
      <dc:date>2014-03-19T14:24:04Z</dc:date>
    </item>
    <item>
      <title>I do not know of a specific</title>
      <link>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953002#M20048</link>
      <description>&lt;P&gt;I do not know of a specific list but I will&amp;nbsp;make some inquiries and let you know what I learn. As Tim said, if there is&amp;nbsp;something specific of interest or that you may have tried that is not working and can offer details or examples then let us know and we will certainly try to help.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2014 16:56:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953002#M20048</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-03-19T16:56:01Z</dc:date>
    </item>
    <item>
      <title>I apologize for the delay.</title>
      <link>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953003#M20049</link>
      <description>&lt;P&gt;I apologize for the delay. There is no specific feature list. Working w/Developers on details, here is&amp;nbsp;the characterization of the support:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Care must be exercised when using classes (user defined and standard libraries - .e.g. cstdio, iostream, standard C++ library) in offloaded code on Windows*. The offload code must not depend on any specific data size or order of allocation of classes between the host (Windows) and target (Linux). Classes with such variances can be used in offloaded code inside a function call (and other functions that it calls) appearing within the lexical scope of an offload pragma; however, such classes cannot be used with IN/OUT/INOUT clauses explicitly or implicitly.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Let me know whether this helps and/or whether you still have specific questions/errors related to &lt;STRONG&gt;std::thread::yield &lt;/STRONG&gt;and &lt;STRONG&gt;std::map::emplace &lt;/STRONG&gt;that I can inquire w/Developers about.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 17:45:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953003#M20049</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-03-24T17:45:30Z</dc:date>
    </item>
    <item>
      <title>Thanks for investigating.</title>
      <link>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953004#M20050</link>
      <description>&lt;P&gt;Thanks for investigating. Perhaps you could ask about std::thread::yield for me. If I take the example from &lt;A href="http://en.cppreference.com/w/cpp/thread/yield" target="_blank"&gt;http://en.cppreference.com/w/cpp/thread/yield&lt;/A&gt; and add decorations for the MIC like so:&lt;/P&gt;

&lt;P&gt;[cpp]&lt;/P&gt;

&lt;PRE style="font-family: Consolas; color: black; background-position: initial initial; background-repeat: initial initial;"&gt;
&lt;SPAN style="color:blue;"&gt;#pragma&lt;/SPAN&gt;&amp;nbsp;offload_attribute(&lt;SPAN style="color:blue;"&gt;push&lt;/SPAN&gt;&amp;nbsp;target(mic))
&lt;SPAN style="color:blue;"&gt;#include&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color:#a31515;"&gt;&amp;lt;iostream&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="color:blue;"&gt;#include&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color:#a31515;"&gt;&amp;lt;chrono&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="color:blue;"&gt;#include&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color:#a31515;"&gt;&amp;lt;thread&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="color:blue;"&gt;#pragma&lt;/SPAN&gt;&amp;nbsp;offload_attribute(&lt;SPAN style="color:blue;"&gt;pop&lt;/SPAN&gt;)
&amp;nbsp;
&lt;SPAN style="color:green;"&gt;//&amp;nbsp;"busy&amp;nbsp;sleep"&amp;nbsp;while&amp;nbsp;suggesting&amp;nbsp;that&amp;nbsp;other&amp;nbsp;threads&amp;nbsp;run&amp;nbsp;&lt;/SPAN&gt;
&lt;SPAN style="color:green;"&gt;//&amp;nbsp;for&amp;nbsp;a&amp;nbsp;small&amp;nbsp;amount&amp;nbsp;of&amp;nbsp;time&lt;/SPAN&gt;
&lt;SPAN style="color:blue;"&gt;__declspec&lt;/SPAN&gt;(target(mic))&amp;nbsp;&lt;SPAN style="color:blue;"&gt;void&lt;/SPAN&gt;&amp;nbsp;little_sleep(std::chrono::&lt;SPAN style="color:#2b91af;"&gt;microseconds&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color:gray;"&gt;us&lt;/SPAN&gt;)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color:blue;"&gt;auto&lt;/SPAN&gt;&amp;nbsp;start&amp;nbsp;=&amp;nbsp;std::chrono::&lt;SPAN style="color:#2b91af;"&gt;high_resolution_clock&lt;/SPAN&gt;::now();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color:blue;"&gt;auto&lt;/SPAN&gt;&amp;nbsp;end&amp;nbsp;=&amp;nbsp;start&amp;nbsp;+&amp;nbsp;&lt;SPAN style="color:gray;"&gt;us&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color:blue;"&gt;do&lt;/SPAN&gt;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::this_thread::yield();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;SPAN style="color:blue;"&gt;while&lt;/SPAN&gt;&amp;nbsp;(std::chrono::&lt;SPAN style="color:#2b91af;"&gt;high_resolution_clock&lt;/SPAN&gt;::now()&amp;nbsp;&amp;lt;&amp;nbsp;end);
}
&amp;nbsp;
&lt;SPAN style="color:blue;"&gt;int&lt;/SPAN&gt;&amp;nbsp;main()
{
&lt;SPAN style="color:blue;"&gt;#pragma&lt;/SPAN&gt;&amp;nbsp;offload&amp;nbsp;target(mic&amp;nbsp;:&amp;nbsp;0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color:blue;"&gt;auto&lt;/SPAN&gt;&amp;nbsp;start&amp;nbsp;=&amp;nbsp;std::chrono::&lt;SPAN style="color:#2b91af;"&gt;high_resolution_clock&lt;/SPAN&gt;::now();
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;little_sleep(std::chrono::&lt;SPAN style="color:#2b91af;"&gt;microseconds&lt;/SPAN&gt;(100));
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color:blue;"&gt;auto&lt;/SPAN&gt;&amp;nbsp;elapsed&amp;nbsp;=&amp;nbsp;std::chrono::&lt;SPAN style="color:#2b91af;"&gt;high_resolution_clock&lt;/SPAN&gt;::now()&amp;nbsp;-&amp;nbsp;start;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::cout&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;&lt;SPAN style="color:#a31515;"&gt;"waited&amp;nbsp;for&amp;nbsp;"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;std::chrono::duration_cast&amp;lt;std::chrono::&lt;SPAN style="color:#2b91af;"&gt;microseconds&lt;/SPAN&gt;&amp;gt;(elapsed).count()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;&lt;SPAN style="color:#a31515;"&gt;"&amp;nbsp;microseconds\n"&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
}&lt;/PRE&gt;

&lt;PRE&gt;
&lt;IOSTREAM&gt;&lt;CHRONO&gt;&lt;THREAD&gt;&lt;:CHRONO::MICROSECONDS&gt;[/cpp]&lt;/:CHRONO::MICROSECONDS&gt;&lt;/THREAD&gt;&lt;/CHRONO&gt;&lt;/IOSTREAM&gt;&lt;/PRE&gt;

&lt;P&gt;It won't compile:&lt;/P&gt;

&lt;PRE&gt;
1&amp;gt;  Building with Intel(R) C++ Compiler XE 14.0
1&amp;gt;ClCompile:
1&amp;gt;  ***** ClCompile (x64 - Intel C++)
1&amp;gt;  Main.cpp
1&amp;gt;Main.cpp(14): error : *MIC* namespace "std::this_thread" has no member "yield"
1&amp;gt;            std::this_thread::yield();
1&amp;gt;                              ^
1&amp;gt;  
1&amp;gt;  compilation aborted for Main.cpp (code 2)
1&amp;gt;icl : error #10340: problem encountered when performing target compilation
1&amp;gt;
1&amp;gt;Build FAILED.
&lt;/PRE&gt;

&lt;P&gt;Any advice?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2014 13:47:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953004#M20050</guid>
      <dc:creator>John_F_1</dc:creator>
      <dc:date>2014-03-25T13:47:05Z</dc:date>
    </item>
    <item>
      <title>Developers indicate thread:</title>
      <link>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953005#M20051</link>
      <description>&lt;P&gt;Developers indicate &lt;STRONG&gt;thread::yield&lt;/STRONG&gt; was added to g++ in version 4.8. The Xeon Phi™ binutils is based off g++ 4.7. When the host version of g++ is set to 4.7, the code fails to compile on *host* as well.&amp;nbsp; Others have reported similar related issues. We are anticipating an upgrade to the Xeon Phi™ g++ base in a future release targeted to the Knights Landing release/timeframe. I'm sorry I don't have better news about this.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2014 21:18:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953005#M20051</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-03-25T21:18:43Z</dc:date>
    </item>
    <item>
      <title>Ok, thank you for explaining</title>
      <link>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953006#M20052</link>
      <description>&lt;P&gt;Ok, thank you for explaining it. I guess the document I was looking for originally is a combination of these two pages?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://gcc.gnu.org/gcc-4.7/cxx0x_status.html" target="_blank"&gt;http://gcc.gnu.org/gcc-4.7/cxx0x_status.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.200x" target="_blank"&gt;http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.200x&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2014 12:53:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Reference-for-C-11-support-in-offloaded-code/m-p/953006#M20052</guid>
      <dc:creator>John_F_1</dc:creator>
      <dc:date>2014-03-26T12:53:55Z</dc:date>
    </item>
  </channel>
</rss>

