Initialize the CUDA Driver API. This must be called before any other custa function is called. Typically, this should be at the start of your program. All other functions will fail unless the API is initialized first. The `flags` parameter is used to configure the CUDA API. Currently no flags are defined, so it must be `CudaFlags::empty()`.
(flags: CudaFlags)
| 103 | /// The `flags` parameter is used to configure the CUDA API. Currently no flags are defined, so |
| 104 | /// it must be `CudaFlags::empty()`. |
| 105 | pub fn init(flags: CudaFlags) -> CudaResult<()> { |
| 106 | unsafe { cuInit(flags.bits()).to_result() } |
| 107 | } |
| 108 | |
| 109 | /// Shortcut for initializing the CUDA Driver API and creating a CUDA context with default settings |
| 110 | /// for the first device. |