<?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 Exception unhandled at Event = submit_impl(CGF, CodeLoc); in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1366106#M1937</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two files Library.lib and Main.cpp. Library.lib contains two files :&amp;nbsp; Sample1.cpp and Sample2.cpp.&lt;/P&gt;
&lt;P&gt;In the Library.lib file, I am trying to access a function in Sample1.cpp from Sample2.cpp within the kernel scope. But the program throws an exception at queue.hpp -&amp;nbsp; &amp;gt;&amp;nbsp;Event = submit_impl(CGF, CodeLoc); .&lt;/P&gt;
&lt;P&gt;I appreciate your help.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Sun, 06 Mar 2022 07:48:01 GMT</pubDate>
    <dc:creator>student4</dc:creator>
    <dc:date>2022-03-06T07:48:01Z</dc:date>
    <item>
      <title>Exception unhandled at Event = submit_impl(CGF, CodeLoc);</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1366106#M1937</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two files Library.lib and Main.cpp. Library.lib contains two files :&amp;nbsp; Sample1.cpp and Sample2.cpp.&lt;/P&gt;
&lt;P&gt;In the Library.lib file, I am trying to access a function in Sample1.cpp from Sample2.cpp within the kernel scope. But the program throws an exception at queue.hpp -&amp;nbsp; &amp;gt;&amp;nbsp;Event = submit_impl(CGF, CodeLoc); .&lt;/P&gt;
&lt;P&gt;I appreciate your help.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Mar 2022 07:48:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1366106#M1937</guid>
      <dc:creator>student4</dc:creator>
      <dc:date>2022-03-06T07:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exception unhandled at Event = submit_impl(CGF, CodeLoc);</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1366107#M1938</link>
      <description>&lt;P&gt;I am unable to attach Sample1.cpp and Sample2.cpp. Below, are the contents of the two files.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Sample1.cpp&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#include "Sample1.h"&lt;/P&gt;
&lt;P&gt;Sample1::Sample1()&lt;BR /&gt;{&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;Sample1::~Sample1()&lt;BR /&gt;{&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;void Sample1::trial()&lt;BR /&gt;{&lt;BR /&gt;int c = a + b;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;void Sample1::trial2()&lt;BR /&gt;{&lt;BR /&gt;int d = a + b;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Sample2.cpp&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#include "Sample2.h"&lt;BR /&gt;#include "Sample1.h"&lt;/P&gt;
&lt;P&gt;Sample2::Sample2()&lt;BR /&gt;{&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;Sample2::~Sample2()&lt;BR /&gt;{&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;void Sample2::trial3()&lt;BR /&gt;{&lt;BR /&gt;std::vector&amp;lt;int&amp;gt;sym_indices(4);&lt;BR /&gt;std::vector&amp;lt;int&amp;gt;best_syms(7);&lt;BR /&gt;std::vector&amp;lt;int&amp;gt;Lptemp(7);&lt;BR /&gt;sycl::buffer sym_indicesBuff(sym_indices);&lt;BR /&gt;sycl::buffer best_symsBuff(best_syms);&lt;BR /&gt;sycl::buffer LpBuff(Lptemp);&lt;BR /&gt;// device selection&lt;BR /&gt;cl::sycl::ext::intel::fpga_emulator_selector d_selector;&lt;BR /&gt;// queue declaration&lt;BR /&gt;cl::sycl::queue q(d_selector);&lt;BR /&gt;&lt;BR /&gt;q.submit([&amp;amp;](sycl::handler&amp;amp; h)&lt;BR /&gt;{&lt;/P&gt;
&lt;P&gt;sycl::accessor sym_indicesAccess(sym_indicesBuff, h, sycl::read_only);&lt;BR /&gt;sycl::accessor best_symsAccess(best_symsBuff, h, sycl::read_only);&lt;BR /&gt;sycl::accessor LpAccessor(LpBuff, h, sycl::read_write);&lt;/P&gt;
&lt;P&gt;q.single_task([=]() {&lt;BR /&gt;&lt;BR /&gt;for (int i = 0; i &amp;lt; 7; i++)&lt;BR /&gt;{&lt;BR /&gt;LpAccessor[i] = best_symsAccess[i] + sym_indicesAccess[i];&lt;BR /&gt;}&lt;BR /&gt;Sample1 object;&lt;BR /&gt;object.trial();&lt;BR /&gt;});&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Sun, 06 Mar 2022 07:52:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1366107#M1938</guid>
      <dc:creator>student4</dc:creator>
      <dc:date>2022-03-06T07:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Exception unhandled at Event = submit_impl(CGF, CodeLoc);</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1366337#M1942</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for posting in Intel Communities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In sample2::trails3() function, could you please change the &lt;STRONG&gt;q.single_task() to h.single_task()&lt;/STRONG&gt; in sample2.cpp. After changing it to the handler(h) instead of a queue(q), it works fine without any error as shown in the screenshot.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="HemanthCH_Intel_0-1646659022122.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/27340iDB4AF110E974436C/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="HemanthCH_Intel_0-1646659022122.png" alt="HemanthCH_Intel_0-1646659022122.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try at your end? If this resolves your issue, make sure to accept this as a solution. This would help others with a similar issue. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Hemanth.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 13:17:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1366337#M1942</guid>
      <dc:creator>HemanthCH_Intel</dc:creator>
      <dc:date>2022-03-07T13:17:35Z</dc:date>
    </item>
    <item>
      <title>Re:Exception unhandled at Event = submit_impl(CGF, CodeLoc);</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1368556#M1960</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We haven't heard back from you. Could you please provide an update on your issue?&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;Hemanth.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Mar 2022 13:09:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1368556#M1960</guid>
      <dc:creator>HemanthCH_Intel</dc:creator>
      <dc:date>2022-03-14T13:09:59Z</dc:date>
    </item>
    <item>
      <title>Re:Exception unhandled at Event = submit_impl(CGF, CodeLoc);</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1370650#M1981</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.&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;Hemanth&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Mar 2022 16:57:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1370650#M1981</guid>
      <dc:creator>HemanthCH_Intel</dc:creator>
      <dc:date>2022-03-21T16:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Exception unhandled at Event = submit_impl(CGF, CodeLoc);</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1371241#M1986</link>
      <description>&lt;P&gt;Thanks a lot. The code works.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 06:18:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Exception-unhandled-at-Event-submit-impl-CGF-CodeLoc/m-p/1371241#M1986</guid>
      <dc:creator>student4</dc:creator>
      <dc:date>2022-03-23T06:18:57Z</dc:date>
    </item>
  </channel>
</rss>

