+2017-11-14 Tom de Vries <tom@codesourcery.com>
+
+ * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Allow to run for
+ non-nvidia devices.
+
2017-11-07 Jakub Jelinek <jakub@redhat.com>
PR c++/82835
-/* { dg-do run { target openacc_nvidia_accel_selected } } */
-/* { dg-additional-options "-lcuda" } */
+/* { dg-do run } */
+/* { dg-additional-options "-lcuda" { target openacc_nvidia_accel_selected } } */
#include <openacc.h>
#include <stdlib.h>
+#if defined ACC_DEVICE_TYPE_nvidia
#include "cuda.h"
+#endif
#include <stdio.h>
#include <sys/time.h>
int
main (int argc, char **argv)
{
+#if defined ACC_DEVICE_TYPE_nvidia
CUresult r;
CUstream stream1;
+#endif
int N = 128; //1024 * 1024;
float *a, *b, *c, *d, *e;
int i;
int nbytes;
+#if defined ACC_DEVICE_TYPE_nvidia
acc_init (acc_device_nvidia);
+#endif
nbytes = N * sizeof (float);
}
+#if defined ACC_DEVICE_TYPE_nvidia
r = cuStreamCreate (&stream1, CU_STREAM_NON_BLOCKING);
if (r != CUDA_SUCCESS)
{
}
acc_set_cuda_stream (1, stream1);
+#endif
for (i = 0; i < N; i++)
{
}
+#if defined ACC_DEVICE_TYPE_nvidia
r = cuStreamCreate (&stream1, CU_STREAM_NON_BLOCKING);
if (r != CUDA_SUCCESS)
{
}
acc_set_cuda_stream (1, stream1);
+#endif
for (i = 0; i < N; i++)
{
abort ();
}
+#if defined ACC_DEVICE_TYPE_nvidia
acc_shutdown (acc_device_nvidia);
+#endif
return 0;
}