|
47 | 47 | opdi::logic->onParallelEnd(opdiInternalParallelData); \ |
48 | 48 | } |
49 | 49 |
|
50 | | -#if OPDI_BACKEND_GENERATE_WORK_EVENTS |
51 | | - #define OPDI_WORK(type, endpoint) opdi::logic->onWork(kind, endpoint) |
52 | | -#else |
53 | | - #define OPDI_WORK(type, endpoint) /* empty */ |
54 | | -#endif |
55 | | - |
56 | 50 | #define OPDI_FOR(...) \ |
57 | 51 | opdi::ImplicitBarrierTools::beginRegionWithImplicitBarrier(); \ |
58 | | - OPDI_WORK(opdi::LogicInterface::WorksharingKind::Loop, opdi::LogicInterface::ScopeEndpoint::Begin); \ |
59 | 52 | OPDI_PRAGMA(omp for __VA_ARGS__ private(opdi::internalLoopProbe)) |
60 | 53 |
|
61 | 54 | #define OPDI_END_FOR \ |
62 | | - OPDI_WORK(opdi::LogicInterface::WorksharingKind::Loop, opdi::LogicInterface::ScopeEndpoint::End); \ |
63 | 55 | opdi::ImplicitBarrierTools::endRegionWithImplicitBarrier(); |
64 | 56 |
|
65 | 57 | #define OPDI_SECTIONS(...) \ |
66 | 58 | opdi::ImplicitBarrierTools::beginRegionWithImplicitBarrier(); \ |
67 | | - OPDI_WORK(opdi::LogicInterface::WorksharingKind::Sections, opdi::LogicInterface::ScopeEndpoint::Begin); \ |
68 | 59 | OPDI_PRAGMA(omp sections private(opdi::internalSectionsProbe) __VA_ARGS__) |
69 | 60 |
|
70 | 61 | #define OPDI_END_SECTIONS \ |
71 | | - OPDI_WORK(opdi::LogicInterface::WorksharingKind::Sections, opdi::LogicInterface::ScopeEndpoint::End); \ |
72 | 62 | opdi::ImplicitBarrierTools::endRegionWithImplicitBarrier(); |
73 | 63 |
|
74 | 64 | #define OPDI_SINGLE(...) \ |
75 | 65 | { \ |
76 | | - OPDI_WORK(opdi::LogicInterface::WorksharingKind::Single, opdi::LogicInterface::ScopeEndpoint::Begin); \ |
77 | 66 | bool constexpr opdiInternalBarrierIndicator = true; \ |
78 | 67 | void* opdiInternalTapePosition1 = opdi::tool->allocPosition(); \ |
79 | 68 | opdi::tool->getTapePosition(opdi::tool->getThreadLocalTape(), opdiInternalTapePosition1); \ |
|
90 | 79 |
|
91 | 80 | #define OPDI_SINGLE_NOWAIT(...) \ |
92 | 81 | { \ |
93 | | - OPDI_WORK(opdi::LogicInterface::WorksharingKind::Single, opdi::LogicInterface::ScopeEndpoint::Begin); \ |
94 | 82 | bool constexpr opdiInternalBarrierIndicator = false; \ |
95 | 83 | void* opdiInternalTapePosition1 = opdi::tool->allocPosition(); \ |
96 | 84 | void* opdiInternalTapePosition2 = opdi::tool->allocPosition(); /* for consistency with the end macro */ \ |
|
113 | 101 | } \ |
114 | 102 | opdi::tool->freePosition(opdiInternalTapePosition1); \ |
115 | 103 | opdi::tool->freePosition(opdiInternalTapePosition2); \ |
116 | | - OPDI_WORK(opdi::LogicInterface::WorksharingKind::Single, opdi::LogicInterface::ScopeEndpoint::End); \ |
117 | 104 | opdi::ImplicitBarrierTools::implicitBarrierStack.top() = opdiInternalBarrierIndicator; \ |
118 | 105 | opdi::ImplicitBarrierTools::endRegionWithImplicitBarrier(); \ |
119 | 106 | } |
|
0 commit comments