[Openmp-commits] [PATCH] D68100: [OpenMP 5.0] declare mapper runtime implementation
Lingda Li via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sat Jul 25 08:07:43 PDT 2020
lildmh added a comment.
In D68100#2173949 <https://reviews.llvm.org/D68100#2173949>, @protze.joachim wrote:
> From my perspective, the declare_mapper_target.cpp code is semantically equivalent to:
>
> #pragma omp target data map(tofrom: c)
> #pragma omp target data map(tofrom: c.a[0:NUM])
> #pragma omp target teams distribute parallel for
> for (int i = 0; i < NUM; i++) {
> ++c.a[i];
> }
>
>
> and
>
> #pragma omp target enter data map(to: c)
> #pragma omp target enter data map(to: c.a[0:NUM])
>
> #pragma omp target teams distribute parallel for
> for (int i = 0; i < NUM; i++) {
> ++c.a[i];
> }
> #pragma omp target exit data map(from: c.a[0:NUM])
> #pragma omp target exit data map(from: c)
>
>
> Can you express the behavior of your mapping implementation in terms of OpenMP target enter/exit data primitives?
You are basically right. In implementation, a function is generated for every mapper to do all internal mapping. More details can be found at https://github.com/lingda-li/public-sharing/blob/master/mapper_runtime_design.pptx
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68100/new/
https://reviews.llvm.org/D68100
More information about the Openmp-commits
mailing list