[Openmp-commits] [PATCH] D64080: [OPENMP]Make __kmpc_push_tripcount thread safe.

Hal Finkel via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jul 3 14:55:20 PDT 2019


hfinkel added a comment.

In D64080#1569299 <https://reviews.llvm.org/D64080#1569299>, @ABataev wrote:

> In D64080#1569266 <https://reviews.llvm.org/D64080#1569266>, @hfinkel wrote:
>
> > In D64080#1568348 <https://reviews.llvm.org/D64080#1568348>, @ABataev wrote:
> >
> > > Added note.
> >
> >
> > The patch description says that you add a trip count "per thread", but the code is adding a trip count per device. Could this still cause a problem if multiple threads have target regions for the same device?
>
>
> No. We already have tripcount per device: each device stores its unique tripcount value, but only one. I extended the existing solution to have the tripcount not only per device, but also per host thread.


Would there be any advantage to using `__kmpc_threadprivate_register` and `__kmpc_threadprivate` (or similar) instead of storing a map with thread ids?


Repository:
  rOMP OpenMP

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64080/new/

https://reviews.llvm.org/D64080





More information about the Openmp-commits mailing list