()
| 117 | /// context. |
| 118 | #[must_use = "The CUDA Context must be kept alive or errors will be issued for any CUDA function that is run"] |
| 119 | pub fn quick_init() -> CudaResult<Context> { |
| 120 | init(CudaFlags::empty())?; |
| 121 | let device = Device::get_device(0)?; |
| 122 | let ctx = Context::new(device)?; |
| 123 | ctx.set_flags(ContextFlags::SCHED_AUTO)?; |
| 124 | Ok(ctx) |
| 125 | } |
| 126 | |
| 127 | /// Struct representing the CUDA API version number. |
| 128 | #[derive(Debug, Hash, Eq, PartialEq, Ord, PartialOrd, Copy, Clone)] |