Hi! On Wed, 22 Jul 2015 16:39:54 +0200, I wrote: > [...] cleanup; committed to > gomp-4_0-branch in r226072: [...]
OK for trunk? commit a8bd7234d7b6b0111a1e3b3dc032ea5eead7e258 Author: Thomas Schwinge <tho...@codesourcery.com> Date: Fri Oct 9 16:40:56 2015 +0200 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. --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c | 14 ++------------ libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c | 9 +-------- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c | 17 +++-------------- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c | 14 ++++++-------- 4 files changed, 12 insertions(+), 42 deletions(-) diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c index 26318f1..8ed743d 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-1.c +++ 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 libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c index cf1af8c..55054c0 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-10.c +++ 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 libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c index c658dd6..353cd1c 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-2.c +++ 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 libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c index a4cf7f2..5dce9b8 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-9.c +++ 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++) Grüße, Thomas
signature.asc
Description: PGP signature