def nvmlDeviceGetTotalEccErrors(handle, errorType, counterType):
    r"""
    /**
     * Retrieves the total ECC error counts for the device.
     *
     * For Fermi &tm; or newer fully supported devices.
     * Only applicable to devices with ECC.
     * Requires \a NVML_INFOROM_ECC version 1.0 or higher.
     * Requires ECC Mode to be enabled.
     *
     * The total error count is the sum of errors across each of the separate memory systems, i.e. the total set of
     * errors across the entire device.
     *
     * See \ref nvmlMemoryErrorType_t for a description of available error types.\n
     * See \ref nvmlEccCounterType_t for a description of available counter types.
     *
     * @param device                               The identifier of the target device
     * @param errorType                            Flag that specifies the type of the errors.
     * @param counterType                          Flag that specifies the counter-type of the errors.
     * @param eccCounts                            Reference in which to return the specified ECC errors
     *
     * @return
     *         - \ref NVML_SUCCESS                 if \a eccCounts has been set
     *         - \ref NVML_ERROR_UNINITIALIZED     if the library has not been successfully initialized
     *         - \ref NVML_ERROR_INVALID_ARGUMENT  if \a device, \a errorType or \a counterType is invalid, or \a eccCounts is NULL
     *         - \ref NVML_ERROR_NOT_SUPPORTED     if the device does not support this feature
     *         - \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
     *
     * @see nvmlDeviceClearEccErrorCounts()
     */
    nvmlReturn_t DECLDIR nvmlDeviceGetTotalEccErrors
    """
    c_count = c_ulonglong()
    fn = _nvmlGetFunctionPointer("nvmlDeviceGetTotalEccErrors")
    ret = fn(handle, _nvmlMemoryErrorType_t(errorType),
	         _nvmlEccCounterType_t(counterType), byref(c_count))
    _nvmlCheckReturn(ret)
    return bytes_to_str(c_count.value)
r"""
    /**
     * Retrieves the total ECC error counts for the device.
     *
     * For Fermi &tm; or newer fully supported devices.
     * Only applicable to devices with ECC.
     * Requires \a NVML_INFOROM_ECC version 1.0 or higher.
     * Requires ECC Mode to be enabled.
     *
     * The total error count is the sum of errors across each of the separate memory systems, i.e. the total set of
     * errors across the entire device.
     *
     * See \ref nvmlMemoryErrorType_t for a description of available error types.\n
     * See \ref nvmlEccCounterType_t for a description of available counter types.
     *
     * @param device                               The identifier of the target device
     * @param errorType                            Flag that specifies the type of the errors.
     * @param counterType                          Flag that specifies the counter-type of the errors.
     * @param eccCounts                            Reference in which to return the specified ECC errors
     *
     * @return
     *         - \ref NVML_SUCCESS                 if \a eccCounts has been set
     *         - \ref NVML_ERROR_UNINITIALIZED     if the library has not been successfully initialized
     *         - \ref NVML_ERROR_INVALID_ARGUMENT  if \a device, \a errorType or \a counterType is invalid, or \a eccCounts is NULL
     *         - \ref NVML_ERROR_NOT_SUPPORTED     if the device does not support this feature
     *         - \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
     *
     * @see nvmlDeviceClearEccErrorCounts()
     */
    nvmlReturn_t DECLDIR nvmlDeviceGetTotalEccErrors