Skip to content

Commit 48cfebe

Browse files
author
Boris Kosmynin
committed
Adjust Array tests
1 parent ab8096e commit 48cfebe

7 files changed

+9
-7
lines changed

clang/tools/sotoc/test/arrays/global_array_static.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212

1313
int tmp = 0;
1414

15-
#pragma omp target device(0) map(from:X[:10])
15+
#pragma omp target update to(X[:10])
16+
#pragma omp target device(0)
1617
{
1718
for(int i = 0; i < 10; ++i){
1819
X[i] = 1;
1920
}
2021
}
22+
#pragma omp target update from(X[:10])
2123

2224
for(int i = 0; i < 10; ++i){
2325
tmp += X[i];

clang/tools/sotoc/test/arrays/static_variable_length_array_2d.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ int main(){
77
int size=512;
88
float A[size][2];
99

10-
#pragma omp target map(tofrom:A[:size*2])
10+
#pragma omp target map(tofrom:A[:size][:2])
1111
{
1212
int i;
1313
for(i=0; i< size; i++){

clang/tools/sotoc/test/arrays/static_variable_length_array_2d_sw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ int main(){
77
int size=512;
88
float A[2][size];
99

10-
#pragma omp target map(tofrom:A[:size*2])
10+
#pragma omp target map(tofrom:A[:2][:size])
1111
{
1212
int i;
1313
for(i=0; i< size; i++){

clang/tools/sotoc/test/arrays/static_variable_length_array_3d.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ int main(){
77
int size=512;
88
float A[size][2][5];
99

10-
#pragma omp target map(tofrom:A[:size*2*5])
10+
#pragma omp target map(tofrom:A[:size][:2][:5])
1111
{
1212
int i;
1313
for(i=0; i< size; i++){

clang/tools/sotoc/test/arrays/static_variable_length_array_3d_sw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ int main(){
77
int size=512;
88
float A[2][size][5];
99

10-
#pragma omp target map(tofrom:A[:size*2*5])
10+
#pragma omp target map(tofrom:A[:2][:size][:5])
1111
{
1212
int i;
1313
for(i=0; i< size; i++){

clang/tools/sotoc/test/arrays/variable_length_array_1d.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ int main(){
66
int j;
77
int size=512;
88
float A[size];
9-
#pragma omp target map(tofrom:A[0:size],size)
9+
#pragma omp target map(tofrom:A[0:size])
1010
{
1111
int i;
1212
for(i=0; i< size; i++){

clang/tools/sotoc/test/arrays/variable_length_array_2d.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ int main(){
77
int sizeX=512;
88
int sizeY=512;
99
float A[sizeX][sizeY];
10-
#pragma omp target map(tofrom:A[0:sizeX*sizeY])
10+
#pragma omp target map(tofrom:A[:sizeX][:sizeY])
1111
{
1212
int i;
1313
int j;

0 commit comments

Comments
 (0)