Skip to main content

set_device

Function set_device 

Source
pub fn set_device(device: u32) -> CudaRtResult<()>
Expand description

Selects device as the current CUDA device for the calling thread.

Mirrors cudaSetDevice.

ยงErrors

Returns CudaRtError::InvalidDevice if device >= get_device_count(), or CudaRtError::DriverNotAvailable if the driver is absent.