1 // RUN: %libomptarget-compile-run-and-check-generic
2 // REQUIRES: nvptx64-nvidia-cuda
10 typedef void *cudaStream_t
;
14 int device_id
= omp_get_default_device();
16 #pragma omp parallel master
20 omp_interop_t interop
;
22 #pragma omp interop init(targetsync : interop) device(device_id) nowait
23 assert(interop
!= NULL
);
26 for (int i
= omp_ipr_first
; i
< 0; i
++) {
28 omp_get_interop_name(interop
, (omp_interop_property_t
)(i
));
30 omp_get_interop_int(interop
, (omp_interop_property_t
)(i
), &err
);
32 omp_get_interop_ptr(interop
, (omp_interop_property_t
)(i
), &err
);
34 omp_get_interop_str(interop
, (omp_interop_property_t
)(i
), &err
);
36 omp_get_interop_type_desc(interop
, (omp_interop_property_t
)(i
));
38 #pragma omp interop use(interop) depend(in : D0, D2)
41 (omp_get_interop_ptr(interop
, omp_ipr_targetsync
, NULL
));
42 assert(stream
!= NULL
);
44 #pragma omp interop destroy(interop) depend(in : D0, D2) device(device_id)