<?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 Can Intel Parallel Studio C++ Compiler Compile Parallel C++ Program? in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Can-Intel-Parallel-Studio-C-Compiler-Compile-Parallel-C-Program/m-p/1142220#M7759</link>
    <description>&lt;P&gt;Can Intel Parallel Studio C++ Compiler compile parallel C++ program with all C++ 17 &amp;amp; Parallel TS (Technical Standard) features please?&lt;/P&gt;

&lt;P&gt;Can&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;Intel Parallel Studio C++ Compiler compile below given parallel&amp;nbsp; C++ program please?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Following web site has small program to parallel sum elements of a Vector:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://en.cppreference.com/w/cpp/experimental/reduce" target="_blank"&gt;http://en.cppreference.com/w/cpp/experimental/reduce&lt;/A&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;chrono&amp;gt;
#include &amp;lt;vector&amp;gt;
#include &amp;lt;numeric&amp;gt;
// #include &amp;lt;experimental/execution_policy&amp;gt;
// #include &amp;lt;experimental/numeric&amp;gt;
#include &amp;lt;experimental/execution_policy&amp;gt;
#include &amp;lt;experimental/numeric&amp;gt;

int main()
{
std::vector&amp;lt;double&amp;gt; v(10'000'007, 0.5);

{
auto t1 = std::chrono::high_resolution_clock::now();
double result = std::accumulate(v.begin(), v.end(), 0.0);
auto t2 = std::chrono::high_resolution_clock::now();
std::chrono::duration&amp;lt;double, std::milli&amp;gt; ms = t2 - t1;
std::cout &amp;lt;&amp;lt; std::fixed &amp;lt;&amp;lt; "std::accumulate result " &amp;lt;&amp;lt; result
&amp;lt;&amp;lt; " took " &amp;lt;&amp;lt; ms.count() &amp;lt;&amp;lt; " ms\n";
}

{
auto t1 = std::chrono::high_resolution_clock::now();
double result = std::experimental::parallel::reduce(
std::experimental::parallel::par,
v.begin(), v.end());
auto t2 = std::chrono::high_resolution_clock::now();
std::chrono::duration&amp;lt;double, std::milli&amp;gt; ms = t2 - t1;
std::cout &amp;lt;&amp;lt; "parallel::reduce result "
&amp;lt;&amp;lt; result &amp;lt;&amp;lt; " took " &amp;lt;&amp;lt; ms.count() &amp;lt;&amp;lt; " ms\n";
}
}&lt;/PRE&gt;

&lt;P&gt;Above program output will be:&lt;/P&gt;

&lt;P&gt;&amp;lt;&lt;BR /&gt;
	std::accumulate result 5000003.50000 took 12.7365 ms&lt;BR /&gt;
	parallel::reduce result 5000003.50000 took 5.06423 ms&lt;BR /&gt;
	&amp;gt;&lt;/P&gt;

&lt;P&gt;I compiled this program using Microsoft Visual C++ 2017 Professional.&lt;/P&gt;

&lt;P&gt;Compiler is giving following errors:&lt;/P&gt;

&lt;P&gt;cannot open source file "experimental/execution_policy"&lt;/P&gt;

&lt;P&gt;cannot open source file "experimental/numeric"&lt;/P&gt;

&lt;P&gt;Any information to resolve these compilation errors please?&lt;/P&gt;

&lt;P&gt;I do not have Intel C++ compiler at present.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Before, I buy Intel C++ compiler, I like to confirm Intel C++ compiler&amp;nbsp; software will compile above shown&amp;nbsp; parallel C++ program and other such parallel programs please?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 17 Oct 2017 05:36:31 GMT</pubDate>
    <dc:creator>Alex_C_1</dc:creator>
    <dc:date>2017-10-17T05:36:31Z</dc:date>
    <item>
      <title>Can Intel Parallel Studio C++ Compiler Compile Parallel C++ Program?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Can-Intel-Parallel-Studio-C-Compiler-Compile-Parallel-C-Program/m-p/1142220#M7759</link>
      <description>&lt;P&gt;Can Intel Parallel Studio C++ Compiler compile parallel C++ program with all C++ 17 &amp;amp; Parallel TS (Technical Standard) features please?&lt;/P&gt;

&lt;P&gt;Can&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;Intel Parallel Studio C++ Compiler compile below given parallel&amp;nbsp; C++ program please?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Following web site has small program to parallel sum elements of a Vector:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://en.cppreference.com/w/cpp/experimental/reduce" target="_blank"&gt;http://en.cppreference.com/w/cpp/experimental/reduce&lt;/A&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;chrono&amp;gt;
#include &amp;lt;vector&amp;gt;
#include &amp;lt;numeric&amp;gt;
// #include &amp;lt;experimental/execution_policy&amp;gt;
// #include &amp;lt;experimental/numeric&amp;gt;
#include &amp;lt;experimental/execution_policy&amp;gt;
#include &amp;lt;experimental/numeric&amp;gt;

int main()
{
std::vector&amp;lt;double&amp;gt; v(10'000'007, 0.5);

{
auto t1 = std::chrono::high_resolution_clock::now();
double result = std::accumulate(v.begin(), v.end(), 0.0);
auto t2 = std::chrono::high_resolution_clock::now();
std::chrono::duration&amp;lt;double, std::milli&amp;gt; ms = t2 - t1;
std::cout &amp;lt;&amp;lt; std::fixed &amp;lt;&amp;lt; "std::accumulate result " &amp;lt;&amp;lt; result
&amp;lt;&amp;lt; " took " &amp;lt;&amp;lt; ms.count() &amp;lt;&amp;lt; " ms\n";
}

{
auto t1 = std::chrono::high_resolution_clock::now();
double result = std::experimental::parallel::reduce(
std::experimental::parallel::par,
v.begin(), v.end());
auto t2 = std::chrono::high_resolution_clock::now();
std::chrono::duration&amp;lt;double, std::milli&amp;gt; ms = t2 - t1;
std::cout &amp;lt;&amp;lt; "parallel::reduce result "
&amp;lt;&amp;lt; result &amp;lt;&amp;lt; " took " &amp;lt;&amp;lt; ms.count() &amp;lt;&amp;lt; " ms\n";
}
}&lt;/PRE&gt;

&lt;P&gt;Above program output will be:&lt;/P&gt;

&lt;P&gt;&amp;lt;&lt;BR /&gt;
	std::accumulate result 5000003.50000 took 12.7365 ms&lt;BR /&gt;
	parallel::reduce result 5000003.50000 took 5.06423 ms&lt;BR /&gt;
	&amp;gt;&lt;/P&gt;

&lt;P&gt;I compiled this program using Microsoft Visual C++ 2017 Professional.&lt;/P&gt;

&lt;P&gt;Compiler is giving following errors:&lt;/P&gt;

&lt;P&gt;cannot open source file "experimental/execution_policy"&lt;/P&gt;

&lt;P&gt;cannot open source file "experimental/numeric"&lt;/P&gt;

&lt;P&gt;Any information to resolve these compilation errors please?&lt;/P&gt;

&lt;P&gt;I do not have Intel C++ compiler at present.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Before, I buy Intel C++ compiler, I like to confirm Intel C++ compiler&amp;nbsp; software will compile above shown&amp;nbsp; parallel C++ program and other such parallel programs please?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 05:36:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Can-Intel-Parallel-Studio-C-Compiler-Compile-Parallel-C-Program/m-p/1142220#M7759</guid>
      <dc:creator>Alex_C_1</dc:creator>
      <dc:date>2017-10-17T05:36:31Z</dc:date>
    </item>
  </channel>
</rss>

