1 /* { dg-do run { target openacc_nvidia_accel_selected } } */
2 /* { dg-additional-options "-lcuda" } */
11 main (int argc
, char **argv
)
17 acc_init (acc_device_nvidia
);
19 (void) acc_get_device_num (acc_device_nvidia
);
23 stream
= (CUstream
) acc_get_cuda_stream (0);
27 r
= cuStreamCreate (&stream
, CU_STREAM_DEFAULT
);
28 if (r
!= CUDA_SUCCESS
)
30 fprintf (stderr
, "cuStreamCreate failed: %d\n", r
);
34 if (!acc_set_cuda_stream (0, stream
))
39 acc_wait_all_async (0);
43 atime
= stop_timer (0);
47 fprintf (stderr
, "actual time too long\n");
53 acc_shutdown (acc_device_nvidia
);
58 /* { dg-output "" } */