summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authortschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-26 16:24:54 +0000
committertschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-26 16:24:54 +0000
commit3c41a4f17f727373340749ec0699c62b62b93b67 (patch)
treedcd0a55afdd0ec52a1b1cb6bec90d6feba7b6ed2 /libgomp
parentcfe316ad3a766aa93361cec6325a3bc75c310e59 (diff)
downloadgcc-3c41a4f17f727373340749ec0699c62b62b93b67.tar.gz
libgomp testsuite: Remove some explicit acc_device_nvidia usage.
libgomp/ * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Remove explicit acc_device_nvidia usage. * testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229381 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog6
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c14
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c9
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c17
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c14
5 files changed, 18 insertions, 42 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index ad970df522f..fa9027b1428 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,5 +1,11 @@
2015-10-26 Thomas Schwinge <thomas@codesourcery.com>
+ * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Remove explicit
+ acc_device_nvidia usage.
+ * testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise.
+
* oacc-init.c (acc_shutdown): Call gomp_init_targets_once.
* testsuite/libgomp.oacc-c-c++-common/lib-8.c: New file.
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c
index 26318f1cca4..8ed743d18d3 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c
@@ -6,19 +6,9 @@
int
main (int argc, char **argv)
{
- acc_device_t devtype = acc_device_host;
-
-#if ACC_DEVICE_TYPE_nvidia
- devtype = acc_device_nvidia;
-
- if (acc_get_num_devices (devtype) == 0)
- return 0;
-#endif
-
- acc_init (devtype);
-
+ acc_init (acc_device_default);
fprintf (stderr, "CheCKpOInT\n");
- acc_init (devtype);
+ acc_init (acc_device_default);
return 0;
}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c
index cf1af8c142f..55054c00296 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c
@@ -7,14 +7,7 @@ int
main (int argc, char **argv)
{
void *d;
- acc_device_t devtype = acc_device_host;
-
-#if ACC_DEVICE_TYPE_nvidia
- devtype = acc_device_nvidia;
-
- if (acc_get_num_devices (acc_device_nvidia) == 0)
- return 0;
-#endif
+ acc_device_t devtype = acc_device_default;
acc_init (devtype);
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c
index c658dd66861..353cd1c4d31 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c
@@ -6,21 +6,10 @@
int
main (int argc, char **argv)
{
- acc_device_t devtype = acc_device_host;
-
-#if ACC_DEVICE_TYPE_nvidia
- devtype = acc_device_nvidia;
-
- if (acc_get_num_devices (acc_device_nvidia) == 0)
- return 0;
-#endif
-
- acc_init (devtype);
-
- acc_shutdown (devtype);
-
+ acc_init (acc_device_default);
+ acc_shutdown (acc_device_default);
fprintf (stderr, "CheCKpOInT\n");
- acc_shutdown (devtype);
+ acc_shutdown (acc_device_default);
return 0;
}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c
index a4cf7f2e848..5dce9b82088 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c
@@ -9,18 +9,17 @@ main (int argc, char **argv)
int i;
int num_devices;
int devnum;
- acc_device_t devtype = acc_device_host;
-
-#if ACC_DEVICE_TYPE_nvidia
- devtype = acc_device_nvidia;
-#endif
+ acc_device_t devtype = acc_device_default;
num_devices = acc_get_num_devices (devtype);
if (num_devices == 0)
- return 0;
+ abort ();
acc_init (devtype);
+ if (num_devices != acc_get_num_devices (devtype))
+ abort ();
+
for (i = 0; i < num_devices; i++)
{
acc_set_device_num (i, devtype);
@@ -31,8 +30,7 @@ main (int argc, char **argv)
acc_shutdown (devtype);
- num_devices = acc_get_num_devices (devtype);
- if (num_devices == 0)
+ if (num_devices != acc_get_num_devices (devtype))
abort ();
for (i = 0; i < num_devices; i++)