<div dir="ltr"><div>That is very helpful. Currently the linear lookup is too slow. My profiling result shows most of my time spent in lookup.</div><div>std::list and linear searching is quite bad for me. Considering std::set which provides logarithmic complexity searching although insert/erase cost logarithmic complexity as well.</div><div>I'm not worried about insert/erase since it is nothing compared to device malloc/free and it can be optimized with "target enter/exit data".</div><div>Any concerns on this?<br></div><div>Best,<br></div><div>Ye<br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">===================<br>
Ye Luo, Ph.D.<br>Computational Science Division & Leadership Computing Facility<br>
Argonne National Laboratory</div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 18, 2020 at 4:32 PM Rokos, Georgios <<a href="mailto:georgios.rokos@intel.com">georgios.rokos@intel.com</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">
<div lang="EN-US">
<div class="gmail-m_5719650485393656262WordSection1">
<p class="MsoNormal">Hi Ye,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Yes, it’s safe to assume so. If the user code tries to map a new memory region which extends into an already mapped memory region, then libomptarget will error out and won’t perform the new mapping. The only case where such an extension
into already mapped data is allowed is when the mapping is implicit, but in that case no new mapping is created actually, i.e. the library reuses the existing entry in HostDataToTargetMap to perform address translation.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">George<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b>From:</b> Openmp-dev <<a href="mailto:openmp-dev-bounces@lists.llvm.org" target="_blank">openmp-dev-bounces@lists.llvm.org</a>> <b>
On Behalf Of </b>Ye Luo via Openmp-dev<br>
<b>Sent:</b> Thursday, 18 June, 2020 06:18<br>
<b>To:</b> via Openmp-dev <<a href="mailto:openmp-dev@lists.llvm.org" target="_blank">openmp-dev@lists.llvm.org</a>><br>
<b>Subject:</b> [Openmp-dev] Non overlapping memory segments<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi all,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Can I safely assume no overlapping memory segments stored in HostDataToTargetMap in libomptarget?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Best,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Ye<u></u><u></u></p>
</div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">===================<br>
Ye Luo, Ph.D.<br>
Computational Science Division & Leadership Computing Facility<br>
Argonne National Laboratory<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div>