Including two tests
These callbacks were added late to the 5.0 specification, an implementation is missing.
Paths
| Differential D70395
[OpenMP] Implementation of OMPT reduction callbacks ClosedPublic Authored by protze.joachim on Nov 18 2019, 6:49 AM.
Details
Diff Detail Event TimelineComment Actions
Yes. I was expecting functions but macros seems to be the solution used in this code so far.
Comment Actions Macro outsourced to ompt_specific, which is included by both kmp source files. Comment Actions
Macros are used, because variables are in the callers scope and re-used by the end macro. Probably a question of style: should there be a do{}while(0) to catch the ;? Comment Actions Thx, looks much cleaner (IMHO) and good to me now.
I would have tried references/pointers but I guess macros are the state-of-the-art solution here.
Sure. This revision is now accepted and ready to land.Dec 10 2019, 9:22 AM
Revision Contents
Diff 233028 openmp/runtime/src/kmp_barrier.cpp
openmp/runtime/src/kmp_csupport.cpp
openmp/runtime/src/ompt-event-specific.h
openmp/runtime/src/ompt-specific.h
openmp/runtime/test/ompt/callback.h
openmp/runtime/test/ompt/synchronization/reduction/empty_reduce.c
openmp/runtime/test/ompt/synchronization/reduction/tree_reduce.c
|
These seem to be basically the same block(s) of code multiple times. Can we outline them into a helper (including the guards)?