Function hip_sys::hiprt::hipGetDevice
source · pub unsafe extern "C" fn hipGetDevice(
deviceId: *mut i32
) -> hipError_tExpand description
@brief Return the default device id for the calling host thread.
@param [out] device *device is written with the default device
HIP maintains an default device for each thread using thread-local-storage. This device is used implicitly for HIP runtime APIs called by this thread. hipGetDevice returns in * @p device the default device for the calling host thread.
@returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue
@see hipSetDevice, hipGetDevicesizeBytes