pub unsafe extern "C" fn cudaInitDevice(
device: c_int,
deviceFlags: c_uint,
flags: c_uint,
) -> cudaError_t
Expand description
\brief Initialize device to be used for GPU executions
This function will initialize the CUDA Runtime structures and primary context on \p device when called, but the context will not be made current to \p device.
When ::cudaInitDeviceFlagsAreValid is set in \p flags, deviceFlags are applied to the requested device. The values of deviceFlags match those of the flags parameters in ::cudaSetDeviceFlags. The effect may be verified by ::cudaGetDeviceFlags.
This function will return an error if the device is in ::cudaComputeModeExclusiveProcess and is occupied by another process or if the device is in ::cudaComputeModeProhibited.
\param device - Device on which the runtime will initialize itself. \param deviceFlags - Parameters for device operation. \param flags - Flags for controlling the device initialization.
\return ::cudaSuccess, ::cudaErrorInvalidDevice, \notefnerr \note_init_rt \note_callback
\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties, ::cudaChooseDevice, ::cudaSetDevice ::cuCtxSetCurrent