Function cudaGetDevice

Source
pub unsafe extern "C" fn cudaGetDevice(
    device: *mut c_int,
) -> cudaError_t
Expand description

\brief Returns which device is currently being used

Returns in \p *device the current device for the calling host thread.

\param device - Returns the device on which the active host thread executes the device code.

\return ::cudaSuccess, ::cudaErrorInvalidValue, ::cudaErrorDeviceUnavailable, \notefnerr \note_init_rt \note_callback

\sa ::cudaGetDeviceCount, ::cudaSetDevice, ::cudaGetDeviceProperties, ::cudaChooseDevice, ::cuCtxGetCurrent