Skip to content

Commit 67691a9

Browse files
committed
Fix false positives among OpDiLib's files.
1 parent cfd5755 commit 67691a9

5 files changed

Lines changed: 19 additions & 15 deletions

File tree

tests/tests/TestExternalFunctionGlobal.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ struct TestExternalFunctionGlobal : public TestBase<4, 1, 3, TestExternalFunctio
9898
eh->addOutput(intermediate[i]);
9999
}
100100
}
101-
#if _OPENMP >= 202011
102-
OPDI_END_MASKED
103-
#else
101+
#if _OPENMP < 202011
104102
OPDI_END_MASTER
103+
#else
104+
OPDI_END_MASKED
105105
#endif
106106

107107
OPDI_BARRIER()
@@ -129,10 +129,10 @@ struct TestExternalFunctionGlobal : public TestBase<4, 1, 3, TestExternalFunctio
129129
{
130130
delete eh;
131131
}
132-
#if _OPENMP >= 202011
133-
OPDI_END_MASKED
134-
#else
132+
#if _OPENMP < 202011
135133
OPDI_END_MASTER
134+
#else
135+
OPDI_END_MASKED
136136
#endif
137137
}
138138
OPDI_END_PARALLEL

tests/tests/TestExternalFunctionLogicCalls.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ struct TestExternalFunctionLogicCalls : public TestBase<4, 1, 3, TestExternalFun
131131
eh->addOutput(intermediate[i]);
132132
}
133133
}
134-
#if _OPENMP >= 202011
135-
OPDI_END_MASKED
136-
#else
134+
#if _OPENMP < 202011
137135
OPDI_END_MASTER
136+
#else
137+
OPDI_END_MASKED
138138
#endif
139139

140140
OPDI_BARRIER()
@@ -162,10 +162,10 @@ struct TestExternalFunctionLogicCalls : public TestBase<4, 1, 3, TestExternalFun
162162
{
163163
delete eh;
164164
}
165-
#if _OPENMP >= 202011
166-
OPDI_END_MASKED
167-
#else
165+
#if _OPENMP < 202011
168166
OPDI_END_MASTER
167+
#else
168+
OPDI_END_MASKED
169169
#endif
170170
}
171171
OPDI_END_PARALLEL

tests/tests/TestMasked.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ struct TestMasked : public TestBase<4, 1, 3, TestMasked<_Case>> {
6161
out[0] += jobResults[i];
6262
}
6363
}
64-
#if _OPENMP >= 202011
65-
OPDI_END_MASKED
66-
#else
64+
#if _OPENMP < 202011
6765
OPDI_END_MASTER
66+
#else
67+
OPDI_END_MASKED
6868
#endif
6969
}
7070
OPDI_END_PARALLEL

tests/tests/TestParallelCopyin.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ struct TestParallelCopyin : public TestBase<4, 1, 3, TestParallelCopyin<_Case>>
6969
#if !defined(__GNUC__) || defined(__clang__)
7070
OPDI_PARALLEL(copyin(helper))
7171
#else
72+
// opdi-syntax-off
7273
OPDI_PARALLEL(firstprivate(helper))
74+
// opdi-syntax-on
7375
#endif
7476
{
7577
int nThreads = omp_get_num_threads();

tests/tests/TestSingleCopyprivateNowait.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ struct TestSingleCopyprivateNowait : public TestBase<4, 1, 3, TestSingleCopypriv
5656
#if _OPENMP >= 202411
5757
OPDI_SINGLE_COPYPRIVATE_NOWAIT(copyprivate(helper))
5858
#else
59+
// opdi-syntax-off
5960
OPDI_SINGLE_COPYPRIVATE(copyprivate(helper))
61+
// opdi-syntax-on
6062
#endif
6163
{
6264
for (int i = 0; i < N / 2; ++i) {

0 commit comments

Comments
 (0)