def nvmlDeviceGetTemperature(handle, sensor):
    r"""
    /**
     * Retrieves the current temperature readings for the device, in degrees C.
     *
     * For all products.
     *
     * See \ref nvmlTemperatureSensors_t for details on available temperature sensors.
     *
     * @param device                               The identifier of the target device
     * @param sensorType                           Flag that indicates which sensor reading to retrieve
     * @param temp                                 Reference in which to return the temperature reading
     *
     * @return
     *         - \ref NVML_SUCCESS                 if \a temp has been set
     *         - \ref NVML_ERROR_UNINITIALIZED     if the library has not been successfully initialized
     *         - \ref NVML_ERROR_INVALID_ARGUMENT  if \a device is invalid, \a sensorType is invalid or \a temp is NULL
     *         - \ref NVML_ERROR_NOT_SUPPORTED     if the device does not have the specified sensor
     *         - \ref NVML_ERROR_GPU_IS_LOST       if the target GPU has fallen off the bus or is otherwise inaccessible
     *         - \ref NVML_ERROR_UNKNOWN           on any unexpected error
     */
    nvmlReturn_t DECLDIR nvmlDeviceGetTemperature
    """
    c_temp = c_uint()
    fn = _nvmlGetFunctionPointer("nvmlDeviceGetTemperature")
    ret = fn(handle, _nvmlTemperatureSensors_t(sensor), byref(c_temp))
    _nvmlCheckReturn(ret)
    return bytes_to_str(c_temp.value)