[Openmp-commits] [PATCH] D117997: [libomptarget] Lookup by base address when begin address is not mapped.
    Alexey Bataev via Phabricator via Openmp-commits 
    openmp-commits at lists.llvm.org
       
    Sun Jan 23 12:50:31 PST 2022
    
    
  
ABataev added inline comments.
================
Comment at: openmp/libomptarget/test/mapping/array_section_implicit_capture.c:31
+  // are captured implicitly so the library must look them up using their base
+  // address.
+  #pragma omp target
----------------
grokos wrote:
> ye-luo wrote:
> > When two distinct sections of A is mapped, implicit map looks up the base address, then which section to pick.
> > 
> > I think in this example, the implicit map should fail to look up A.
> > Users needs to explicitly add map(to: A[FROM:LENGTH], B[FROM:LENGTH]) to be valid.
> We only map one section, mapping two distinct sections of the same object is illegal. Implicitly mapping more, i.e. asking for the base when only a section in the middle of the object has been mapped is allowed. This example is valid OpenMP usage.
IIRC, Ye is correct here. Mapping 2 sections in different constructs is legal, just the inner one must be a subset of the outer.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117997/new/
https://reviews.llvm.org/D117997
    
    
More information about the Openmp-commits
mailing list