Skip to main content

init

Function init 

Source
pub fn init() -> CudaResult<()>
Expand description

Initialise the CUDA driver API.

This must be called before any other driver function. It is safe to call multiple times; subsequent calls are no-ops inside the driver itself.

Internally this loads the shared library (if not already cached) and invokes cuInit(0).

ยงErrors

Returns CudaError::NotInitialized if the CUDA driver library cannot be loaded, or another CudaError variant if cuInit reports a failure.