[Openmp-commits] [PATCH] D68100: [OpenMP 5.0] declare mapper runtime implementation

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Jul 25 01:48:00 PDT 2020


protze.joachim added a comment.

>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?


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