Skip to content

Commit 4e2e8e7

Browse files
committed
Reductions in the macro backend: remove lock remnants.
1 parent a917afd commit 4e2e8e7

3 files changed

Lines changed: 0 additions & 17 deletions

File tree

include/opdi/backend/macro/macroBackend.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ std::stack<void*> opdi::DataTools::implicitTaskData;
3434

3535
std::stack<bool> opdi::ImplicitBarrierTools::implicitBarrierStack;
3636

37-
omp_lock_t opdi::ReductionTools::globalReductionLock;
38-
std::list<omp_nest_lock_t*> opdi::ReductionTools::individualReductionLocks;
3937
std::stack<bool> opdi::ReductionTools::hasReductions;
4038
std::stack<bool> opdi::ReductionTools::needsBarrierBeforeReductions;
4139
std::stack<bool> opdi::ReductionTools::needsBarrierAfterReductions;

include/opdi/backend/macro/macroBackend.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,13 @@ namespace opdi {
5757
// remaining functions from backend interface
5858

5959
void init() {
60-
opdi_init_lock(&ReductionTools::globalReductionLock);
61-
6260
// task data for initial implicit task is created in the logic layer
6361
}
6462

6563
void finalize() {
6664
// pop task data associated with initial implicit task
6765
DataTools::popTaskData();
6866
assert(DataTools::getImplicitTaskData() == nullptr);
69-
70-
opdi_set_lock(&ReductionTools::globalReductionLock);
71-
72-
for (auto lock : ReductionTools::individualReductionLocks) {
73-
opdi_destroy_nest_lock(lock);
74-
}
75-
76-
opdi_unset_lock(&ReductionTools::globalReductionLock);
77-
78-
opdi_destroy_lock(&ReductionTools::globalReductionLock);
7967
}
8068

8169
void* getParallelData() {

include/opdi/backend/macro/reductionTools.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ namespace opdi {
4141

4242
struct ReductionTools {
4343
public:
44-
static omp_lock_t globalReductionLock;
45-
static std::list<omp_nest_lock_t*> individualReductionLocks;
46-
4744
/* item indicates a construct that might have a reduction clause */
4845
/* its value indicates whether there is a reduction clause */
4946
static std::stack<bool> hasReductions;

0 commit comments

Comments
 (0)