<?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:How do I translate this OpenACC code to SYCL? in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1393003#M2292</link>
    <description>&lt;P&gt;Closing this thread as there was no response from the customer.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 16 Jun 2022 11:42:55 GMT</pubDate>
    <dc:creator>Subarnarek_G_Intel</dc:creator>
    <dc:date>2022-06-16T11:42:55Z</dc:date>
    <item>
      <title>How do I translate this OpenACC code to SYCL?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1381173#M2288</link>
      <description>&lt;P&gt;Hi Intel team it's me again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to know how to parallelize this:&lt;/P&gt;
&lt;PRE&gt;//#pragma acc parallel loop&lt;BR /&gt;  for(i=0; i&amp;lt;targets; i++)&lt;BR /&gt;  {&lt;BR /&gt;    //#pragma acc loop &lt;BR /&gt;    for(j=0; j&amp;lt;lines_samples; j++)&lt;BR /&gt;    {&lt;BR /&gt;      if(i == (targets-1)) x_p[i*lines_samples+j] = 0;&lt;BR /&gt;      u[i] += pow(x_p[i*lines_samples+j], 2);&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;    if(sum1 &amp;lt; u[i]) sum1 = u[i]; // Does this make it unparallelizable?&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;The problem is that last line. I tried to parallelize it like this:&lt;/P&gt;
&lt;PRE&gt;my_queue.submit([&amp;amp;](auto &amp;amp;h) {&lt;BR /&gt;  h.parallel_for(sycl::range&amp;lt;2&amp;gt;(targets,lines_samples), [=](auto index) {&lt;BR /&gt;    int i = index[0];&lt;BR /&gt;    int j = index[1];&lt;BR /&gt;    if(i == (targets-1)) x_p[i*lines_samples+j] = 0;&lt;BR /&gt;    u[i] += pow(x_p[i*lines_samples+j], 2);&lt;BR /&gt;  });&lt;BR /&gt;}).wait();&lt;/PRE&gt;
&lt;P&gt;But as you can see, I don't know where to put that last line so the behaviour is the same. That line is supposed to be executed only once per i iteration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking forward to your answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 10:54:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1381173#M2288</guid>
      <dc:creator>gamersensual14</dc:creator>
      <dc:date>2022-05-02T10:54:10Z</dc:date>
    </item>
    <item>
      <title>Re:How do I translate this OpenACC code to SYCL?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1382301#M2289</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for reaching out to us, we are working on your issue.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please refer the below DPCPP/SYCL documentation for migration.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/data-parallel-c-plus-plus.html" rel="noopener noreferrer" target="_blank"&gt;https://www.intel.com/content/www/us/en/developer/tools/oneapi/data-parallel-c-plus-plus.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Manjula&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 06 May 2022 10:21:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1382301#M2289</guid>
      <dc:creator>ManjulaC_Intel</dc:creator>
      <dc:date>2022-05-06T10:21:21Z</dc:date>
    </item>
    <item>
      <title>Re:How do I translate this OpenACC code to SYCL?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1388583#M2290</link>
      <description>&lt;P&gt;Since, you were already using OpenACC an easier approach if you want to offload to Intel GPU's will be through the use of OpenMP Offload. Is there any particular reasons why you aren't using OpenMP Offload? As far as your SYCL code is concerned we need to rewrite the code a bit. You can put a for loop inside parallel_for region as well. Please refer &lt;A href="https://github.com/oneapi-src/oneAPI-samples/blob/a8b6d2bd93ac5a251400ec1fed0cd94f565bf743/DirectProgramming/DPC%2B%2B/DenseLinearAlgebra/matrix_mul/src/matrix_mul_dpcpp.cpp" target="_blank"&gt;https://github.com/oneapi-src/oneAPI-samples/blob/a8b6d2bd93ac5a251400ec1fed0cd94f565bf743/DirectProgramming/DPC%2B%2B/DenseLinearAlgebra/matrix_mul/src/matrix_mul_dpcpp.cpp&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Please let me know if you have further queries.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 May 2022 10:43:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1388583#M2290</guid>
      <dc:creator>Subarnarek_G_Intel</dc:creator>
      <dc:date>2022-05-30T10:43:58Z</dc:date>
    </item>
    <item>
      <title>Re:How do I translate this OpenACC code to SYCL?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1390529#M2291</link>
      <description>&lt;P&gt;Let us know if the provided solution solved the problem.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Jun 2022 07:38:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1390529#M2291</guid>
      <dc:creator>Subarnarek_G_Intel</dc:creator>
      <dc:date>2022-06-07T07:38:29Z</dc:date>
    </item>
    <item>
      <title>Re:How do I translate this OpenACC code to SYCL?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1393003#M2292</link>
      <description>&lt;P&gt;Closing this thread as there was no response from the customer.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Jun 2022 11:42:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1393003#M2292</guid>
      <dc:creator>Subarnarek_G_Intel</dc:creator>
      <dc:date>2022-06-16T11:42:55Z</dc:date>
    </item>
    <item>
      <title>Re:How do I translate this OpenACC code to SYCL?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1393004#M2293</link>
      <description>&lt;P&gt;&lt;EM style="font-family: Calibri, sans-serif; font-size: 11pt;"&gt;This issue has been resolved and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&lt;/EM&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Jun 2022 11:43:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/How-do-I-translate-this-OpenACC-code-to-SYCL/m-p/1393004#M2293</guid>
      <dc:creator>Subarnarek_G_Intel</dc:creator>
      <dc:date>2022-06-16T11:43:42Z</dc:date>
    </item>
  </channel>
</rss>

