File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,6 @@ int main() {
117
117
}
118
118
#endif
119
119
120
-
121
120
#if TEST_CONCURRENT
122
121
// This test cannot run correctly with libomptarget because the library does
123
122
// not support proper async. Fake the output in this case.
@@ -129,30 +128,34 @@ int main() {
129
128
// Run actual test
130
129
for (i = 0 ; i < N ; i ++ ) a [i ] = b [i ] = i ;
131
130
132
- #pragma omp target nowait map(to:b) map(from: a)
131
+ #pragma omp target enter data map(to:a)
132
+
133
+ #pragma omp target nowait map(to:b)
133
134
{
134
135
int j ;
135
136
for (j = 0 ; j < N /4 ; j ++ ) a [j ] = b [j ]+ 1 ;
136
137
}
137
138
138
- #pragma omp target nowait map(to:b) map(from: a)
139
+ #pragma omp target nowait map(to:b)
139
140
{
140
141
int j ;
141
142
for (j = N /4 ; j < N /2 ; j ++ ) a [j ] = b [j ]+ 1 ;
142
143
}
143
144
144
- #pragma omp target nowait map(to:b) map(from: a)
145
+ #pragma omp target nowait map(to:b)
145
146
{
146
147
int j ;
147
148
for (j = N /2 ; j < 3 * (N /4 ); j ++ ) a [j ] = b [j ]+ 1 ;
148
149
}
149
150
150
- #pragma omp target nowait map(to:b) map(from: a)
151
+ #pragma omp target nowait map(to:b)
151
152
{
152
153
int j ;
153
154
for (j = 3 * (N /4 ); j < N ; j ++ ) a [j ] = b [j ]+ 1 ;
154
155
}
155
156
157
+ #pragma omp target exit data map(from: a)
158
+
156
159
#pragma omp taskwait
157
160
158
161
error = 0 ;
You can’t perform that action at this time.
0 commit comments