1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Zero-cost conversions between `baracuda-driver` and `baracuda-runtime`
//! handles.
//!
//! `CUstream == cudaStream_t` and `CUevent == cudaEvent_t` at the C level,
//! so the conversions are essentially pointer reinterpretation.
//!
//! Enable with the `driver-interop` feature on `baracuda-runtime` (pulled
//! in automatically when the umbrella `baracuda` crate has both `driver`
//! and `runtime` features on).
use ;
use ;
/// Extension trait: view a driver-side [`baracuda_driver::Stream`] as a
/// runtime-side `cudaStream_t`. Non-owning — the driver Stream still owns
/// the underlying CUDA resource.
/// Extension trait: view a driver-side [`baracuda_driver::Event`] as a
/// runtime-side `cudaEvent_t`.