<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
It will be hard to map the type with the virtual functions. But OpenMP 5.0 introduces deep copy semantics. Anyway, I would not suggest to use virtual functions on the GPU, it is going to be very slow. Better to use trivial types, that can be bitcopied to/from
 GPUs.<br>
<br>
<div id="AppleMailSignature" dir="ltr">Best regards,
<div>Alexey Bataev</div>
</div>
<div dir="ltr"><br>
8 авг. 2019 г., в 19:15, Itaru Kitayama <<a href="mailto:itaru.kitayama@gmail.com">itaru.kitayama@gmail.com</a>> написал(а):<br>
<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">In which issue the virtual function offloading feature support being worked on? I am not certain still after
<div>going over the OpenMP 5.0 features list.<br>
<div>  </div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Aug 9, 2019 at 2:32 AM Doerfert, Johannes <<a href="mailto:jdoerfert@anl.gov">jdoerfert@anl.gov</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Itaru, a webpage with implementation status details is in the works,<br>
  <a href="https://reviews.llvm.org/D64375" rel="noreferrer" target="_blank">https://reviews.llvm.org/D64375</a><br>
but it seems hard to agree on an initial version.<br>
<br>
On 08/05, Itaru Kitayama via Openmp-dev wrote:<br>
> Alexey et al.,<br>
> What's the plan for OpenMP 5.0 API adoption in Clang? Would you point me to<br>
> a link to an appropriate web page?<br>
> Is there an OpenMP 5.0 API work-in-progress branch which I can give it a<br>
> try?<br>
> <br>
> On Sun, Aug 4, 2019 at 8:57 PM Alexey Bataev <<a href="mailto:a.bataev@hotmail.com" target="_blank">a.bataev@hotmail.com</a>> wrote:<br>
> <br>
> > clang works in accordance with the standard. Standard says that mapping is<br>
> > performed as bitwise copy of the objects. You can perform the bitwise copy<br>
> > safely only for the trivial types.<br>
> > You cannot simply map a vector. You need to convert it to C/C++ array at<br>
> > first.<br>
> > OpenMP 5.0 introduced user-defined mappers to solve the problem of<br>
> > non-trivial types mapping, which are not supported by clang yet. We're<br>
> > working on this feature.<br>
> ><br>
> > Best regards,<br>
> > Alexey Bataev<br>
> ><br>
> > > 4 авг. 2019 г., в 1:16, Itaru Kitayama via Openmp-dev <<br>
> > <a href="mailto:openmp-dev@lists.llvm.org" target="_blank">openmp-dev@lists.llvm.org</a>> написал(а):<br>
> > ><br>
> > > Hi,<br>
> > > This simple code:<br>
> > ><br>
> > > int main() {<br>
> > ><br>
> > > std::vector<int> v(100, 0);<br>
> > > #pragma omp target teams distribute parallel for map(tofrom: v)<br>
> > >    for (int i=0;i<100;i++) {<br>
> > >         v[i] =i;<br>
> > >    }<br>
> > > };<br>
> > ><br>
> > > causes Clang to warn a message like:<br>
> > ><br>
> > > vectormap.cpp:31:62: warning: Non-trivial type 'std::vector<int>' is<br>
> > mapped, only trivial types are guaranteed to be mapped correctly<br>
> > [-Wopenmp-target]<br>
> > > #pragma omp target teams distribute parallel for map(tofrom: v)<br>
> > ><br>
> > >                                    ^<br>
> > > 1 warning generated.<br>
> > ><br>
> > > ... and encounters an issue at run time. How much non-trivial types are<br>
> > > supported in trunk Clang?<br>
> > > _______________________________________________<br>
> > > Openmp-dev mailing list<br>
> > > <a href="mailto:Openmp-dev@lists.llvm.org" target="_blank">Openmp-dev@lists.llvm.org</a><br>
> > > <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" rel="noreferrer" target="_blank">
https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br>
> ><br>
<br>
> _______________________________________________<br>
> Openmp-dev mailing list<br>
> <a href="mailto:Openmp-dev@lists.llvm.org" target="_blank">Openmp-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" rel="noreferrer" target="_blank">
https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br>
<br>
<br>
-- <br>
<br>
Johannes Doerfert<br>
Researcher<br>
<br>
Argonne National Laboratory<br>
Lemont, IL 60439, USA<br>
<br>
<a href="mailto:jdoerfert@anl.gov" target="_blank">jdoerfert@anl.gov</a><br>
</blockquote>
</div>
</div>
</blockquote>
</body>
</html>