public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [openacc, testsuite, committed] Fix libgomp.oacc-c-c++-common/parallel-reduction.c for non-nvidia devices
@ 2017-09-27 12:39 Tom de Vries
  2017-10-07 10:37 ` [openacc, testsuite, committed] Fix libgomp.oacc-fortran/{firstprivate-1,parallel-reduction}.f90 " Tom de Vries
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2017-09-27 12:39 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Thomas Schwinge, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

Hi,

this patch makes the test-case 
libgomp.oacc-c-c++-common/parallel-reduction.c work for non-nvidia devices.

Committed as obvious.

Thanks,
- Tom

[-- Attachment #2: 0001-Fix-libgomp.oacc-c-c-common-parallel-reduction.c-for-non-nvidia-devices.patch --]
[-- Type: text/x-patch, Size: 1047 bytes --]

Fix libgomp.oacc-c-c++-common/parallel-reduction.c for non-nvidia devices

2017-09-27  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c (main):
	Remove acc_device_nvidia references.

---
 libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c
index b2c60e5..077571f 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c
@@ -21,7 +21,7 @@ main ()
     }
   }
 
-  if (acc_get_device_type () != acc_device_nvidia)
+  if (acc_get_device_type () == acc_device_host)
     {
       if (s1 != 1)
 	abort ();
@@ -41,7 +41,7 @@ main ()
     s2 += N;
   }
 
-  if (acc_get_device_type () != acc_device_nvidia)
+  if (acc_get_device_type () == acc_device_host)
     {
       if (s1 != 1)
 	abort ();

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [openacc, testsuite, committed] Fix libgomp.oacc-fortran/{firstprivate-1,parallel-reduction}.f90 for non-nvidia devices
  2017-09-27 12:39 [openacc, testsuite, committed] Fix libgomp.oacc-c-c++-common/parallel-reduction.c for non-nvidia devices Tom de Vries
@ 2017-10-07 10:37 ` Tom de Vries
  0 siblings, 0 replies; 2+ messages in thread
From: Tom de Vries @ 2017-10-07 10:37 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Thomas Schwinge, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 331 bytes --]

[ was: Re: [openacc, testsuite, committed] Fix 
libgomp.oacc-c-c++-common/parallel-reduction.c for non-nvidia devices ]
On 09/27/2017 02:39 PM, Tom de Vries wrote:
> Hi,
> 
> this patch makes the test-case 
> libgomp.oacc-c-c++-common/parallel-reduction.c work for non-nvidia devices.

Committed this similar patch.

Thanks,
- Tom

[-- Attachment #2: 0001-Fix-libgomp.oacc-fortran-firstprivate-1-parallel-reduction-.f90-for-non-nvidia-devices.patch --]
[-- Type: text/x-patch, Size: 1896 bytes --]

Fix libgomp.oacc-fortran/{firstprivate-1,parallel-reduction}.f90 for non-nvidia devices

2017-10-07  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.oacc-fortran/firstprivate-1.f90 (firstprivate):
	Remove acc_device_nvidia references.
	* testsuite/libgomp.oacc-fortran/parallel-reduction.f90 (reduction):
	Same.

---
 libgomp/testsuite/libgomp.oacc-fortran/firstprivate-1.f90     | 2 +-
 libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90 | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libgomp/testsuite/libgomp.oacc-fortran/firstprivate-1.f90 b/libgomp/testsuite/libgomp.oacc-fortran/firstprivate-1.f90
index d3f9093..3866096 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/firstprivate-1.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/firstprivate-1.f90
@@ -5,7 +5,7 @@ program firstprivate
   integer :: a, b(Nupper), c, d, n
   include "openacc_lib.h"
 
-  if (acc_get_device_type () .eq. acc_device_nvidia) then
+  if (acc_get_device_type () .ne. acc_device_host) then
      n = Nupper
   else
      n = 1
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90 b/libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90
index 31db7e1..d0559a2 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90
@@ -15,7 +15,7 @@ program reduction
   s2 = s2 + 1
   !$acc end parallel
 
-  if (acc_get_device_type () .eq. acc_device_nvidia) then
+  if (acc_get_device_type () .ne. acc_device_host) then
      if (s1 .ne. n) call abort
      if (s2 .ne. n) call abort
   else
@@ -29,7 +29,7 @@ program reduction
   s2 = 0
   call redsub (s1, s2, n)
 
-  if (acc_get_device_type () .eq. acc_device_nvidia) then
+  if (acc_get_device_type () .ne. acc_device_host) then
      if (s1 .ne. n) call abort
   else
      if (s2 .ne. 1) call abort

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-07  8:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27 12:39 [openacc, testsuite, committed] Fix libgomp.oacc-c-c++-common/parallel-reduction.c for non-nvidia devices Tom de Vries
2017-10-07 10:37 ` [openacc, testsuite, committed] Fix libgomp.oacc-fortran/{firstprivate-1,parallel-reduction}.f90 " Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).