summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-02 13:16:22 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-02 13:16:22 +0000
commit28e869d086e16805268766ee963c089c4019ab5f (patch)
tree87acdea4347b49c250d21fc4ba6bac0ece39f7c3 /libgomp
parent7d1d684055344d3edc9dcd932c8893589cb90b67 (diff)
downloadgcc-28e869d086e16805268766ee963c089c4019ab5f.tar.gz
gcc/
* omp-low.c (struct oacc_loop): Add 'inner' field. (new_oacc_loop_raw): Initialize it to zero. (oacc_loop_fixed_partitions): Initialize it. (oacc_loop_auto_partitions): Partition outermost loop to outermost available partitioning. gcc/testsuite/ * c-c++-common/goacc/loop-auto-1.c: Adjust expected warnings. libgomp/ * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust expected partitioning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235756 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c54
2 files changed, 34 insertions, 25 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 351c2392530..9de04f57d73 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-02 Nathan Sidwell <nathan@codesourcery.com>
+
+ * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust
+ expected partitioning.
+
2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
PR middle-end/70626
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c
index 622bbdffaea..8a755b88038 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c
@@ -103,9 +103,11 @@ int vector_1 (int *ary, int size)
#pragma acc parallel num_workers (32) vector_length(32) copy(ary[0:size]) firstprivate (size)
{
+#pragma acc loop gang
+ for (int jx = 0; jx < 1; jx++)
#pragma acc loop auto
- for (int ix = 0; ix < size; ix++)
- ary[ix] = place ();
+ for (int ix = 0; ix < size; ix++)
+ ary[ix] = place ();
}
return check (ary, size, 0, 0, 1);
@@ -118,7 +120,7 @@ int vector_2 (int *ary, int size)
#pragma acc parallel num_workers (32) vector_length(32) copy(ary[0:size]) firstprivate (size)
{
#pragma acc loop worker
- for (int jx = 0; jx < size / 64; jx++)
+ for (int jx = 0; jx < size / 64; jx++)
#pragma acc loop auto
for (int ix = 0; ix < 64; ix++)
ary[ix + jx * 64] = place ();
@@ -133,30 +135,16 @@ int worker_1 (int *ary, int size)
#pragma acc parallel num_workers (32) vector_length(32) copy(ary[0:size]) firstprivate (size)
{
+#pragma acc loop gang
+ for (int kx = 0; kx < 1; kx++)
#pragma acc loop auto
- for (int jx = 0; jx < size / 64; jx++)
+ for (int jx = 0; jx < size / 64; jx++)
#pragma acc loop vector
- for (int ix = 0; ix < 64; ix++)
- ary[ix + jx * 64] = place ();
- }
-
- return check (ary, size, 0, 1, 1);
-}
-
-int worker_2 (int *ary, int size)
-{
- clear (ary, size);
-
-#pragma acc parallel num_workers (32) vector_length(32) copy(ary[0:size]) firstprivate (size)
- {
-#pragma acc loop auto
- for (int jx = 0; jx < size / 64; jx++)
-#pragma acc loop auto
- for (int ix = 0; ix < 64; ix++)
- ary[ix + jx * 64] = place ();
+ for (int ix = 0; ix < 64; ix++)
+ ary[ix + jx * 64] = place ();
}
- return check (ary, size, 0, 1, 1);
+ return check (ary, size, 0, 1, 1);
}
int gang_1 (int *ary, int size)
@@ -193,6 +181,22 @@ int gang_2 (int *ary, int size)
return check (ary, size, 1, 1, 1);
}
+int gang_3 (int *ary, int size)
+{
+ clear (ary, size);
+
+#pragma acc parallel num_workers (32) vector_length(32) copy(ary[0:size]) firstprivate (size)
+ {
+#pragma acc loop auto
+ for (int jx = 0; jx < size / 64; jx++)
+#pragma acc loop auto
+ for (int ix = 0; ix < 64; ix++)
+ ary[ix + jx * 64] = place ();
+ }
+
+ return check (ary, size, 1, 0, 1);
+}
+
#define N (32*32*32)
int main ()
{
@@ -214,13 +218,13 @@ int main ()
if (worker_1 (ary, N))
return 1;
- if (worker_2 (ary, N))
- return 1;
if (gang_1 (ary, N))
return 1;
if (gang_2 (ary, N))
return 1;
+ if (gang_3 (ary, N))
+ return 1;
return 0;
}