File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ namespace opdi {
5757 }
5858 ReductionTools::reductionBarrierStack.pop ();
5959 if (ProbeScopeStatus::insideImplicitTaskProbeScope ()) {
60+ logic->onSyncRegion (LogicInterface::SyncRegionKind::BarrierImplementation,
61+ LogicInterface::ScopeEndpoint::Begin);
6062 #pragma omp barrier
6163 logic->onSyncRegion (LogicInterface::SyncRegionKind::BarrierImplementation,
6264 LogicInterface::ScopeEndpoint::End);
@@ -72,6 +74,8 @@ namespace opdi {
7274 #else
7375 logic->onSyncRegion (LogicInterface::SyncRegionKind::BarrierImplementation,
7476 LogicInterface::ScopeEndpoint::Begin);
77+ logic->onSyncRegion (LogicInterface::SyncRegionKind::BarrierImplementation,
78+ LogicInterface::ScopeEndpoint::End);
7579 #endif
7680 }
7781 ReductionTools::reductionBarrierStack.top () = true ;
Original file line number Diff line number Diff line change @@ -80,7 +80,12 @@ namespace opdi {
8080 logic->onSyncRegion (LogicInterface::SyncRegionKind::BarrierExplicit, endpoint);
8181 break ;
8282 case ompt_sync_region_barrier_implementation:
83+ #if OPDI_OMPT_BACKEND_BARRIER_IMPLEMENTATION_BEHAVIOUR == OPDI_PAIR_OF_AD_EVENTS_PER_ENDPOINT
84+ logic->onSyncRegion (LogicInterface::SyncRegionKind::BarrierImplementation, LogicInterface::ScopeEndpoint::Begin);
85+ logic->onSyncRegion (LogicInterface::SyncRegionKind::BarrierImplementation, LogicInterface::ScopeEndpoint::End);
86+ #else
8387 logic->onSyncRegion (LogicInterface::SyncRegionKind::BarrierImplementation, endpoint);
88+ #endif
8489 break ;
8590 #if _OPENMP >= 202011
8691 case ompt_sync_region_barrier_implicit_parallel:
Original file line number Diff line number Diff line change 2727
2828/* ------------------ constants ------------------ */
2929
30- /* backends */
31-
3230#define OPDI_MACRO_BACKEND 1
3331#define OPDI_OMPT_BACKEND 2
3432
4240#define OPDI_OMPT_IMPLICIT_TASK_END 1
4341#define OPDI_OMPT_SYNC_REGION_END 2
4442
43+ #define OPDI_PAIR_OF_AD_EVENTS_PER_ENDPOINT 1
44+ #define OPDI_SINGLE_AD_EVENT_PER_ENDPOINT 2
45+
4546/* ------------------ configuration ------------------ */
4647
4748/* ----- backend configuration ----- */
6162static_assert (0 < OPDI_OMPT_BACKEND_IMPLICIT_TASK_END_SOURCE);
6263static_assert (OPDI_OMPT_BACKEND_IMPLICIT_TASK_END_SOURCE <= 2 );
6364
65+ #ifndef OPDI_OMPT_BACKEND_BARRIER_IMPLEMENTATION_BEHAVIOUR
66+ #define OPDI_OMPT_BACKEND_BARRIER_IMPLEMENTATION_BEHAVIOUR OPDI_PAIR_OF_AD_EVENTS_PER_ENDPOINT
67+ #endif
68+
69+ static_assert (0 < OPDI_OMPT_BACKEND_BARRIER_IMPLEMENTATION_BEHAVIOUR);
70+ static_assert (OPDI_OMPT_BACKEND_BARRIER_IMPLEMENTATION_BEHAVIOUR <= 2 );
6471
6572/* ----- logic configuration ----- */
6673
@@ -105,7 +112,7 @@ static_assert(0 < OPDI_SYNC_REGION_BARRIER_EXPLICIT_BEHAVIOUR);
105112static_assert (OPDI_SYNC_REGION_BARRIER_EXPLICIT_BEHAVIOUR <= 3 );
106113
107114#ifndef OPDI_SYNC_REGION_BARRIER_IMPLEMENTATION_BEHAVIOUR
108- #define OPDI_SYNC_REGION_BARRIER_IMPLEMENTATION_BEHAVIOUR OPDI_SCOPE_ENDPOINT_BOTH
115+ #define OPDI_SYNC_REGION_BARRIER_IMPLEMENTATION_BEHAVIOUR OPDI_SCOPE_ENDPOINT_BEGIN
109116#endif
110117
111118static_assert (0 < OPDI_SYNC_REGION_BARRIER_IMPLEMENTATION_BEHAVIOUR);
You can’t perform that action at this time.
0 commit comments