nvmlReturn_t, ::libloading::Error>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetCount: Result<
unsafe extern "C" fn(deviceCount: *mut raw::c_uint) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetHandleByIndex: Result<
unsafe extern "C" fn(index: raw::c_uint, device: *mut nvmlDevice_t) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetHandleByPciBusId: Result<
unsafe extern "C" fn(
pciBusId: *const raw::c_char,
device: *mut nvmlDevice_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetPciInfo: Result<
unsafe extern "C" fn(device: nvmlDevice_t, pci: *mut nvmlPciInfo_t) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetPciInfo_v2: Result<
unsafe extern "C" fn(device: nvmlDevice_t, pci: *mut nvmlPciInfo_t) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetNvLinkRemotePciInfo: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
link: raw::c_uint,
pci: *mut nvmlPciInfo_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetGridLicensableFeatures: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
pGridLicensableFeatures: *mut nvmlGridLicensableFeatures_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetGridLicensableFeatures_v2: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
pGridLicensableFeatures: *mut nvmlGridLicensableFeatures_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetGridLicensableFeatures_v3: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
pGridLicensableFeatures: *mut nvmlGridLicensableFeatures_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceRemoveGpu: Result<
unsafe extern "C" fn(pciInfo: *mut nvmlPciInfo_t) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlEventSetWait: Result<
unsafe extern "C" fn(
set: nvmlEventSet_t,
data: *mut nvmlEventData_t,
timeoutms: raw::c_uint,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetAttributes: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
attributes: *mut nvmlDeviceAttributes_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlComputeInstanceGetInfo: Result<
unsafe extern "C" fn(
computeInstance: nvmlComputeInstance_t,
info: *mut nvmlComputeInstanceInfo_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetComputeRunningProcesses: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v1_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetComputeRunningProcesses_v2: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v2_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetGraphicsRunningProcesses: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v1_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetGraphicsRunningProcesses_v2: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v2_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetMPSComputeRunningProcesses: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v1_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetMPSComputeRunningProcesses_v2: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v2_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlDeviceGetGpuInstancePossiblePlacements: Result<
unsafe extern "C" fn(
device: nvmlDevice_t,
profileId: raw::c_uint,
placements: *mut nvmlGpuInstancePlacement_t,
count: *mut raw::c_uint,
) -> nvmlReturn_t,
::libloading::Error,
>,
#[cfg(feature = "legacy-functions")]
pub nvmlVgpuInstanceGetLicenseInfo: Result<
unsafe extern "C" fn(
vgpuInstance: nvmlVgpuInstance_t,
licenseInfo: *mut nvmlVgpuLicenseInfo_t,
) -> nvmlReturn_t,
::libloading::Error,
>,
}
impl NvmlLib {
pub unsafe fn new(path: P) -> Result
where
P: AsRef<::std::ffi::OsStr>,
{
let library = ::libloading::Library::new(path)?;
Self::from_library(library)
}
pub unsafe fn from_library(library: L) -> Result
where
L: Into<::libloading::Library>,
{
let __library = library.into();
let nvmlInit_v2 = __library.get(b"nvmlInit_v2\0").map(|sym| *sym);
let nvmlInitWithFlags = __library.get(b"nvmlInitWithFlags\0").map(|sym| *sym);
let nvmlShutdown = __library.get(b"nvmlShutdown\0").map(|sym| *sym);
let nvmlErrorString = __library.get(b"nvmlErrorString\0").map(|sym| *sym);
let nvmlSystemGetDriverVersion = __library
.get(b"nvmlSystemGetDriverVersion\0")
.map(|sym| *sym);
let nvmlSystemGetNVMLVersion = __library.get(b"nvmlSystemGetNVMLVersion\0").map(|sym| *sym);
let nvmlSystemGetCudaDriverVersion = __library
.get(b"nvmlSystemGetCudaDriverVersion\0")
.map(|sym| *sym);
let nvmlSystemGetCudaDriverVersion_v2 = __library
.get(b"nvmlSystemGetCudaDriverVersion_v2\0")
.map(|sym| *sym);
let nvmlSystemGetProcessName = __library.get(b"nvmlSystemGetProcessName\0").map(|sym| *sym);
let nvmlUnitGetCount = __library.get(b"nvmlUnitGetCount\0").map(|sym| *sym);
let nvmlUnitGetHandleByIndex = __library.get(b"nvmlUnitGetHandleByIndex\0").map(|sym| *sym);
let nvmlUnitGetUnitInfo = __library.get(b"nvmlUnitGetUnitInfo\0").map(|sym| *sym);
let nvmlUnitGetLedState = __library.get(b"nvmlUnitGetLedState\0").map(|sym| *sym);
let nvmlUnitGetPsuInfo = __library.get(b"nvmlUnitGetPsuInfo\0").map(|sym| *sym);
let nvmlUnitGetTemperature = __library.get(b"nvmlUnitGetTemperature\0").map(|sym| *sym);
let nvmlUnitGetFanSpeedInfo = __library.get(b"nvmlUnitGetFanSpeedInfo\0").map(|sym| *sym);
let nvmlUnitGetDevices = __library.get(b"nvmlUnitGetDevices\0").map(|sym| *sym);
let nvmlSystemGetHicVersion = __library.get(b"nvmlSystemGetHicVersion\0").map(|sym| *sym);
let nvmlDeviceGetCount_v2 = __library.get(b"nvmlDeviceGetCount_v2\0").map(|sym| *sym);
let nvmlDeviceGetAttributes_v2 = __library
.get(b"nvmlDeviceGetAttributes_v2\0")
.map(|sym| *sym);
let nvmlDeviceGetHandleByIndex_v2 = __library
.get(b"nvmlDeviceGetHandleByIndex_v2\0")
.map(|sym| *sym);
let nvmlDeviceGetHandleBySerial = __library
.get(b"nvmlDeviceGetHandleBySerial\0")
.map(|sym| *sym);
let nvmlDeviceGetHandleByUUID = __library
.get(b"nvmlDeviceGetHandleByUUID\0")
.map(|sym| *sym);
let nvmlDeviceGetHandleByPciBusId_v2 = __library
.get(b"nvmlDeviceGetHandleByPciBusId_v2\0")
.map(|sym| *sym);
let nvmlDeviceGetName = __library.get(b"nvmlDeviceGetName\0").map(|sym| *sym);
let nvmlDeviceGetBrand = __library.get(b"nvmlDeviceGetBrand\0").map(|sym| *sym);
let nvmlDeviceGetIndex = __library.get(b"nvmlDeviceGetIndex\0").map(|sym| *sym);
let nvmlDeviceGetSerial = __library.get(b"nvmlDeviceGetSerial\0").map(|sym| *sym);
let nvmlDeviceGetMemoryAffinity = __library
.get(b"nvmlDeviceGetMemoryAffinity\0")
.map(|sym| *sym);
let nvmlDeviceGetCpuAffinityWithinScope = __library
.get(b"nvmlDeviceGetCpuAffinityWithinScope\0")
.map(|sym| *sym);
let nvmlDeviceGetCpuAffinity = __library.get(b"nvmlDeviceGetCpuAffinity\0").map(|sym| *sym);
let nvmlDeviceSetCpuAffinity = __library.get(b"nvmlDeviceSetCpuAffinity\0").map(|sym| *sym);
let nvmlDeviceClearCpuAffinity = __library
.get(b"nvmlDeviceClearCpuAffinity\0")
.map(|sym| *sym);
let nvmlDeviceGetTopologyCommonAncestor = __library
.get(b"nvmlDeviceGetTopologyCommonAncestor\0")
.map(|sym| *sym);
let nvmlDeviceGetTopologyNearestGpus = __library
.get(b"nvmlDeviceGetTopologyNearestGpus\0")
.map(|sym| *sym);
let nvmlSystemGetTopologyGpuSet = __library
.get(b"nvmlSystemGetTopologyGpuSet\0")
.map(|sym| *sym);
let nvmlDeviceGetP2PStatus = __library.get(b"nvmlDeviceGetP2PStatus\0").map(|sym| *sym);
let nvmlDeviceGetUUID = __library.get(b"nvmlDeviceGetUUID\0").map(|sym| *sym);
let nvmlVgpuInstanceGetMdevUUID = __library
.get(b"nvmlVgpuInstanceGetMdevUUID\0")
.map(|sym| *sym);
let nvmlDeviceGetMinorNumber = __library.get(b"nvmlDeviceGetMinorNumber\0").map(|sym| *sym);
let nvmlDeviceGetBoardPartNumber = __library
.get(b"nvmlDeviceGetBoardPartNumber\0")
.map(|sym| *sym);
let nvmlDeviceGetInforomVersion = __library
.get(b"nvmlDeviceGetInforomVersion\0")
.map(|sym| *sym);
let nvmlDeviceGetInforomImageVersion = __library
.get(b"nvmlDeviceGetInforomImageVersion\0")
.map(|sym| *sym);
let nvmlDeviceGetInforomConfigurationChecksum = __library
.get(b"nvmlDeviceGetInforomConfigurationChecksum\0")
.map(|sym| *sym);
let nvmlDeviceValidateInforom = __library
.get(b"nvmlDeviceValidateInforom\0")
.map(|sym| *sym);
let nvmlDeviceGetDisplayMode = __library.get(b"nvmlDeviceGetDisplayMode\0").map(|sym| *sym);
let nvmlDeviceGetDisplayActive = __library
.get(b"nvmlDeviceGetDisplayActive\0")
.map(|sym| *sym);
let nvmlDeviceGetPersistenceMode = __library
.get(b"nvmlDeviceGetPersistenceMode\0")
.map(|sym| *sym);
let nvmlDeviceGetPciInfo_v3 = __library.get(b"nvmlDeviceGetPciInfo_v3\0").map(|sym| *sym);
let nvmlDeviceGetMaxPcieLinkGeneration = __library
.get(b"nvmlDeviceGetMaxPcieLinkGeneration\0")
.map(|sym| *sym);
let nvmlDeviceGetMaxPcieLinkWidth = __library
.get(b"nvmlDeviceGetMaxPcieLinkWidth\0")
.map(|sym| *sym);
let nvmlDeviceGetCurrPcieLinkGeneration = __library
.get(b"nvmlDeviceGetCurrPcieLinkGeneration\0")
.map(|sym| *sym);
let nvmlDeviceGetCurrPcieLinkWidth = __library
.get(b"nvmlDeviceGetCurrPcieLinkWidth\0")
.map(|sym| *sym);
let nvmlDeviceGetPcieThroughput = __library
.get(b"nvmlDeviceGetPcieThroughput\0")
.map(|sym| *sym);
let nvmlDeviceGetPcieReplayCounter = __library
.get(b"nvmlDeviceGetPcieReplayCounter\0")
.map(|sym| *sym);
let nvmlDeviceGetClockInfo = __library.get(b"nvmlDeviceGetClockInfo\0").map(|sym| *sym);
let nvmlDeviceGetMaxClockInfo = __library
.get(b"nvmlDeviceGetMaxClockInfo\0")
.map(|sym| *sym);
let nvmlDeviceGetApplicationsClock = __library
.get(b"nvmlDeviceGetApplicationsClock\0")
.map(|sym| *sym);
let nvmlDeviceGetDefaultApplicationsClock = __library
.get(b"nvmlDeviceGetDefaultApplicationsClock\0")
.map(|sym| *sym);
let nvmlDeviceResetApplicationsClocks = __library
.get(b"nvmlDeviceResetApplicationsClocks\0")
.map(|sym| *sym);
let nvmlDeviceGetClock = __library.get(b"nvmlDeviceGetClock\0").map(|sym| *sym);
let nvmlDeviceGetMaxCustomerBoostClock = __library
.get(b"nvmlDeviceGetMaxCustomerBoostClock\0")
.map(|sym| *sym);
let nvmlDeviceGetSupportedMemoryClocks = __library
.get(b"nvmlDeviceGetSupportedMemoryClocks\0")
.map(|sym| *sym);
let nvmlDeviceGetSupportedGraphicsClocks = __library
.get(b"nvmlDeviceGetSupportedGraphicsClocks\0")
.map(|sym| *sym);
let nvmlDeviceGetAutoBoostedClocksEnabled = __library
.get(b"nvmlDeviceGetAutoBoostedClocksEnabled\0")
.map(|sym| *sym);
let nvmlDeviceSetAutoBoostedClocksEnabled = __library
.get(b"nvmlDeviceSetAutoBoostedClocksEnabled\0")
.map(|sym| *sym);
let nvmlDeviceSetDefaultAutoBoostedClocksEnabled = __library
.get(b"nvmlDeviceSetDefaultAutoBoostedClocksEnabled\0")
.map(|sym| *sym);
let nvmlDeviceGetFanSpeed = __library.get(b"nvmlDeviceGetFanSpeed\0").map(|sym| *sym);
let nvmlDeviceGetFanSpeed_v2 = __library.get(b"nvmlDeviceGetFanSpeed_v2\0").map(|sym| *sym);
let nvmlDeviceGetTargetFanSpeed = __library
.get(b"nvmlDeviceGetTargetFanSpeed\0")
.map(|sym| *sym);
let nvmlDeviceSetDefaultFanSpeed_v2 = __library
.get(b"nvmlDeviceSetDefaultFanSpeed_v2\0")
.map(|sym| *sym);
let nvmlDeviceGetMinMaxFanSpeed = __library
.get(b"nvmlDeviceGetMinMaxFanSpeed\0")
.map(|sym| *sym);
let nvmlDeviceGetNumFans = __library.get(b"nvmlDeviceGetNumFans\0").map(|sym| *sym);
let nvmlDeviceGetTemperature = __library.get(b"nvmlDeviceGetTemperature\0").map(|sym| *sym);
let nvmlDeviceGetTemperatureThreshold = __library
.get(b"nvmlDeviceGetTemperatureThreshold\0")
.map(|sym| *sym);
let nvmlDeviceSetTemperatureThreshold = __library
.get(b"nvmlDeviceSetTemperatureThreshold\0")
.map(|sym| *sym);
let nvmlDeviceGetThermalSettings = __library
.get(b"nvmlDeviceGetThermalSettings\0")
.map(|sym| *sym);
let nvmlDeviceGetPerformanceState = __library
.get(b"nvmlDeviceGetPerformanceState\0")
.map(|sym| *sym);
let nvmlDeviceGetCurrentClocksThrottleReasons = __library
.get(b"nvmlDeviceGetCurrentClocksThrottleReasons\0")
.map(|sym| *sym);
let nvmlDeviceGetSupportedClocksThrottleReasons = __library
.get(b"nvmlDeviceGetSupportedClocksThrottleReasons\0")
.map(|sym| *sym);
let nvmlDeviceGetPowerState = __library.get(b"nvmlDeviceGetPowerState\0").map(|sym| *sym);
let nvmlDeviceGetPowerManagementMode = __library
.get(b"nvmlDeviceGetPowerManagementMode\0")
.map(|sym| *sym);
let nvmlDeviceGetPowerManagementLimit = __library
.get(b"nvmlDeviceGetPowerManagementLimit\0")
.map(|sym| *sym);
let nvmlDeviceGetPowerManagementLimitConstraints = __library
.get(b"nvmlDeviceGetPowerManagementLimitConstraints\0")
.map(|sym| *sym);
let nvmlDeviceGetPowerManagementDefaultLimit = __library
.get(b"nvmlDeviceGetPowerManagementDefaultLimit\0")
.map(|sym| *sym);
let nvmlDeviceGetPowerUsage = __library.get(b"nvmlDeviceGetPowerUsage\0").map(|sym| *sym);
let nvmlDeviceGetPowerMode = __library.get(b"nvmlDeviceGetPowerMode\0").map(|sym| *sym);
let nvmlDeviceGetSupportedPowerModes = __library
.get(b"nvmlDeviceGetSupportedPowerModes\0")
.map(|sym| *sym);
let nvmlDeviceSetPowerMode = __library.get(b"nvmlDeviceSetPowerMode\0").map(|sym| *sym);
let nvmlDeviceGetTotalEnergyConsumption = __library
.get(b"nvmlDeviceGetTotalEnergyConsumption\0")
.map(|sym| *sym);
let nvmlDeviceGetEnforcedPowerLimit = __library
.get(b"nvmlDeviceGetEnforcedPowerLimit\0")
.map(|sym| *sym);
let nvmlDeviceGetGpuOperationMode = __library
.get(b"nvmlDeviceGetGpuOperationMode\0")
.map(|sym| *sym);
let nvmlDeviceGetMemoryInfo = __library.get(b"nvmlDeviceGetMemoryInfo\0").map(|sym| *sym);
let nvmlDeviceGetMemoryInfo_v2 = __library
.get(b"nvmlDeviceGetMemoryInfo_v2\0")
.map(|sym| *sym);
let nvmlDeviceGetComputeMode = __library.get(b"nvmlDeviceGetComputeMode\0").map(|sym| *sym);
let nvmlDeviceGetCudaComputeCapability = __library
.get(b"nvmlDeviceGetCudaComputeCapability\0")
.map(|sym| *sym);
let nvmlDeviceGetEccMode = __library.get(b"nvmlDeviceGetEccMode\0").map(|sym| *sym);
let nvmlDeviceGetDefaultEccMode = __library
.get(b"nvmlDeviceGetDefaultEccMode\0")
.map(|sym| *sym);
let nvmlDeviceGetBoardId = __library.get(b"nvmlDeviceGetBoardId\0").map(|sym| *sym);
let nvmlDeviceGetMultiGpuBoard = __library
.get(b"nvmlDeviceGetMultiGpuBoard\0")
.map(|sym| *sym);
let nvmlDeviceGetTotalEccErrors = __library
.get(b"nvmlDeviceGetTotalEccErrors\0")
.map(|sym| *sym);
let nvmlDeviceGetDetailedEccErrors = __library
.get(b"nvmlDeviceGetDetailedEccErrors\0")
.map(|sym| *sym);
let nvmlDeviceGetMemoryErrorCounter = __library
.get(b"nvmlDeviceGetMemoryErrorCounter\0")
.map(|sym| *sym);
let nvmlDeviceGetUtilizationRates = __library
.get(b"nvmlDeviceGetUtilizationRates\0")
.map(|sym| *sym);
let nvmlDeviceGetEncoderUtilization = __library
.get(b"nvmlDeviceGetEncoderUtilization\0")
.map(|sym| *sym);
let nvmlDeviceGetEncoderCapacity = __library
.get(b"nvmlDeviceGetEncoderCapacity\0")
.map(|sym| *sym);
let nvmlDeviceGetEncoderStats = __library
.get(b"nvmlDeviceGetEncoderStats\0")
.map(|sym| *sym);
let nvmlDeviceGetEncoderSessions = __library
.get(b"nvmlDeviceGetEncoderSessions\0")
.map(|sym| *sym);
let nvmlDeviceGetDecoderUtilization = __library
.get(b"nvmlDeviceGetDecoderUtilization\0")
.map(|sym| *sym);
let nvmlDeviceGetFBCStats = __library.get(b"nvmlDeviceGetFBCStats\0").map(|sym| *sym);
let nvmlDeviceGetFBCSessions = __library.get(b"nvmlDeviceGetFBCSessions\0").map(|sym| *sym);
let nvmlDeviceGetDriverModel = __library.get(b"nvmlDeviceGetDriverModel\0").map(|sym| *sym);
let nvmlDeviceGetVbiosVersion = __library
.get(b"nvmlDeviceGetVbiosVersion\0")
.map(|sym| *sym);
let nvmlDeviceGetBridgeChipInfo = __library
.get(b"nvmlDeviceGetBridgeChipInfo\0")
.map(|sym| *sym);
let nvmlDeviceGetComputeRunningProcesses_v3 = __library
.get(b"nvmlDeviceGetComputeRunningProcesses_v3\0")
.map(|sym| *sym);
let nvmlDeviceGetGraphicsRunningProcesses_v3 = __library
.get(b"nvmlDeviceGetGraphicsRunningProcesses_v3\0")
.map(|sym| *sym);
let nvmlDeviceGetMPSComputeRunningProcesses_v3 = __library
.get(b"nvmlDeviceGetMPSComputeRunningProcesses_v3\0")
.map(|sym| *sym);
let nvmlDeviceOnSameBoard = __library.get(b"nvmlDeviceOnSameBoard\0").map(|sym| *sym);
let nvmlDeviceGetAPIRestriction = __library
.get(b"nvmlDeviceGetAPIRestriction\0")
.map(|sym| *sym);
let nvmlDeviceGetSamples = __library.get(b"nvmlDeviceGetSamples\0").map(|sym| *sym);
let nvmlDeviceGetBAR1MemoryInfo = __library
.get(b"nvmlDeviceGetBAR1MemoryInfo\0")
.map(|sym| *sym);
let nvmlDeviceGetViolationStatus = __library
.get(b"nvmlDeviceGetViolationStatus\0")
.map(|sym| *sym);
let nvmlDeviceGetIrqNum = __library.get(b"nvmlDeviceGetIrqNum\0").map(|sym| *sym);
let nvmlDeviceGetNumGpuCores = __library.get(b"nvmlDeviceGetNumGpuCores\0").map(|sym| *sym);
let nvmlDeviceGetPowerSource = __library.get(b"nvmlDeviceGetPowerSource\0").map(|sym| *sym);
let nvmlDeviceGetMemoryBusWidth = __library
.get(b"nvmlDeviceGetMemoryBusWidth\0")
.map(|sym| *sym);
let nvmlDeviceGetPcieLinkMaxSpeed = __library
.get(b"nvmlDeviceGetPcieLinkMaxSpeed\0")
.map(|sym| *sym);
let nvmlDeviceGetPcieSpeed = __library.get(b"nvmlDeviceGetPcieSpeed\0").map(|sym| *sym);
let nvmlDeviceGetAdaptiveClockInfoStatus = __library
.get(b"nvmlDeviceGetAdaptiveClockInfoStatus\0")
.map(|sym| *sym);
let nvmlDeviceGetAccountingMode = __library
.get(b"nvmlDeviceGetAccountingMode\0")
.map(|sym| *sym);
let nvmlDeviceGetAccountingStats = __library
.get(b"nvmlDeviceGetAccountingStats\0")
.map(|sym| *sym);
let nvmlDeviceGetAccountingPids = __library
.get(b"nvmlDeviceGetAccountingPids\0")
.map(|sym| *sym);
let nvmlDeviceGetAccountingBufferSize = __library
.get(b"nvmlDeviceGetAccountingBufferSize\0")
.map(|sym| *sym);
let nvmlDeviceGetRetiredPages = __library
.get(b"nvmlDeviceGetRetiredPages\0")
.map(|sym| *sym);
let nvmlDeviceGetRetiredPages_v2 = __library
.get(b"nvmlDeviceGetRetiredPages_v2\0")
.map(|sym| *sym);
let nvmlDeviceGetRetiredPagesPendingStatus = __library
.get(b"nvmlDeviceGetRetiredPagesPendingStatus\0")
.map(|sym| *sym);
let nvmlDeviceGetRemappedRows = __library
.get(b"nvmlDeviceGetRemappedRows\0")
.map(|sym| *sym);
let nvmlDeviceGetRowRemapperHistogram = __library
.get(b"nvmlDeviceGetRowRemapperHistogram\0")
.map(|sym| *sym);
let nvmlDeviceGetArchitecture = __library
.get(b"nvmlDeviceGetArchitecture\0")
.map(|sym| *sym);
let nvmlUnitSetLedState = __library.get(b"nvmlUnitSetLedState\0").map(|sym| *sym);
let nvmlDeviceSetPersistenceMode = __library
.get(b"nvmlDeviceSetPersistenceMode\0")
.map(|sym| *sym);
let nvmlDeviceSetComputeMode = __library.get(b"nvmlDeviceSetComputeMode\0").map(|sym| *sym);
let nvmlDeviceSetEccMode = __library.get(b"nvmlDeviceSetEccMode\0").map(|sym| *sym);
let nvmlDeviceClearEccErrorCounts = __library
.get(b"nvmlDeviceClearEccErrorCounts\0")
.map(|sym| *sym);
let nvmlDeviceSetDriverModel = __library.get(b"nvmlDeviceSetDriverModel\0").map(|sym| *sym);
let nvmlDeviceSetGpuLockedClocks = __library
.get(b"nvmlDeviceSetGpuLockedClocks\0")
.map(|sym| *sym);
let nvmlDeviceResetGpuLockedClocks = __library
.get(b"nvmlDeviceResetGpuLockedClocks\0")
.map(|sym| *sym);
let nvmlDeviceSetMemoryLockedClocks = __library
.get(b"nvmlDeviceSetMemoryLockedClocks\0")
.map(|sym| *sym);
let nvmlDeviceResetMemoryLockedClocks = __library
.get(b"nvmlDeviceResetMemoryLockedClocks\0")
.map(|sym| *sym);
let nvmlDeviceSetApplicationsClocks = __library
.get(b"nvmlDeviceSetApplicationsClocks\0")
.map(|sym| *sym);
let nvmlDeviceGetClkMonStatus = __library
.get(b"nvmlDeviceGetClkMonStatus\0")
.map(|sym| *sym);
let nvmlDeviceSetPowerManagementLimit = __library
.get(b"nvmlDeviceSetPowerManagementLimit\0")
.map(|sym| *sym);
let nvmlDeviceSetGpuOperationMode = __library
.get(b"nvmlDeviceSetGpuOperationMode\0")
.map(|sym| *sym);
let nvmlDeviceSetAPIRestriction = __library
.get(b"nvmlDeviceSetAPIRestriction\0")
.map(|sym| *sym);
let nvmlDeviceSetAccountingMode = __library
.get(b"nvmlDeviceSetAccountingMode\0")
.map(|sym| *sym);
let nvmlDeviceClearAccountingPids = __library
.get(b"nvmlDeviceClearAccountingPids\0")
.map(|sym| *sym);
let nvmlDeviceGetNvLinkState = __library.get(b"nvmlDeviceGetNvLinkState\0").map(|sym| *sym);
let nvmlDeviceGetNvLinkVersion = __library
.get(b"nvmlDeviceGetNvLinkVersion\0")
.map(|sym| *sym);
let nvmlDeviceGetNvLinkCapability = __library
.get(b"nvmlDeviceGetNvLinkCapability\0")
.map(|sym| *sym);
let nvmlDeviceGetNvLinkRemotePciInfo_v2 = __library
.get(b"nvmlDeviceGetNvLinkRemotePciInfo_v2\0")
.map(|sym| *sym);
let nvmlDeviceGetNvLinkErrorCounter = __library
.get(b"nvmlDeviceGetNvLinkErrorCounter\0")
.map(|sym| *sym);
let nvmlDeviceResetNvLinkErrorCounters = __library
.get(b"nvmlDeviceResetNvLinkErrorCounters\0")
.map(|sym| *sym);
let nvmlDeviceSetNvLinkUtilizationControl = __library
.get(b"nvmlDeviceSetNvLinkUtilizationControl\0")
.map(|sym| *sym);
let nvmlDeviceGetNvLinkUtilizationControl = __library
.get(b"nvmlDeviceGetNvLinkUtilizationControl\0")
.map(|sym| *sym);
let nvmlDeviceGetNvLinkUtilizationCounter = __library
.get(b"nvmlDeviceGetNvLinkUtilizationCounter\0")
.map(|sym| *sym);
let nvmlDeviceFreezeNvLinkUtilizationCounter = __library
.get(b"nvmlDeviceFreezeNvLinkUtilizationCounter\0")
.map(|sym| *sym);
let nvmlDeviceResetNvLinkUtilizationCounter = __library
.get(b"nvmlDeviceResetNvLinkUtilizationCounter\0")
.map(|sym| *sym);
let nvmlDeviceGetNvLinkRemoteDeviceType = __library
.get(b"nvmlDeviceGetNvLinkRemoteDeviceType\0")
.map(|sym| *sym);
let nvmlEventSetCreate = __library.get(b"nvmlEventSetCreate\0").map(|sym| *sym);
let nvmlDeviceRegisterEvents = __library.get(b"nvmlDeviceRegisterEvents\0").map(|sym| *sym);
let nvmlDeviceGetSupportedEventTypes = __library
.get(b"nvmlDeviceGetSupportedEventTypes\0")
.map(|sym| *sym);
let nvmlEventSetWait_v2 = __library.get(b"nvmlEventSetWait_v2\0").map(|sym| *sym);
let nvmlEventSetFree = __library.get(b"nvmlEventSetFree\0").map(|sym| *sym);
let nvmlDeviceModifyDrainState = __library
.get(b"nvmlDeviceModifyDrainState\0")
.map(|sym| *sym);
let nvmlDeviceQueryDrainState = __library
.get(b"nvmlDeviceQueryDrainState\0")
.map(|sym| *sym);
let nvmlDeviceRemoveGpu_v2 = __library.get(b"nvmlDeviceRemoveGpu_v2\0").map(|sym| *sym);
let nvmlDeviceDiscoverGpus = __library.get(b"nvmlDeviceDiscoverGpus\0").map(|sym| *sym);
let nvmlDeviceGetFieldValues = __library.get(b"nvmlDeviceGetFieldValues\0").map(|sym| *sym);
let nvmlDeviceGetVirtualizationMode = __library
.get(b"nvmlDeviceGetVirtualizationMode\0")
.map(|sym| *sym);
let nvmlDeviceGetHostVgpuMode = __library
.get(b"nvmlDeviceGetHostVgpuMode\0")
.map(|sym| *sym);
let nvmlDeviceSetVirtualizationMode = __library
.get(b"nvmlDeviceSetVirtualizationMode\0")
.map(|sym| *sym);
let nvmlDeviceGetGridLicensableFeatures_v4 = __library
.get(b"nvmlDeviceGetGridLicensableFeatures_v4\0")
.map(|sym| *sym);
let nvmlDeviceGetProcessUtilization = __library
.get(b"nvmlDeviceGetProcessUtilization\0")
.map(|sym| *sym);
let nvmlDeviceGetGspFirmwareVersion = __library
.get(b"nvmlDeviceGetGspFirmwareVersion\0")
.map(|sym| *sym);
let nvmlDeviceGetGspFirmwareMode = __library
.get(b"nvmlDeviceGetGspFirmwareMode\0")
.map(|sym| *sym);
let nvmlDeviceGetSupportedVgpus = __library
.get(b"nvmlDeviceGetSupportedVgpus\0")
.map(|sym| *sym);
let nvmlDeviceGetCreatableVgpus = __library
.get(b"nvmlDeviceGetCreatableVgpus\0")
.map(|sym| *sym);
let nvmlVgpuTypeGetClass = __library.get(b"nvmlVgpuTypeGetClass\0").map(|sym| *sym);
let nvmlVgpuTypeGetName = __library.get(b"nvmlVgpuTypeGetName\0").map(|sym| *sym);
let nvmlVgpuTypeGetGpuInstanceProfileId = __library
.get(b"nvmlVgpuTypeGetGpuInstanceProfileId\0")
.map(|sym| *sym);
let nvmlVgpuTypeGetDeviceID = __library.get(b"nvmlVgpuTypeGetDeviceID\0").map(|sym| *sym);
let nvmlVgpuTypeGetFramebufferSize = __library
.get(b"nvmlVgpuTypeGetFramebufferSize\0")
.map(|sym| *sym);
let nvmlVgpuTypeGetNumDisplayHeads = __library
.get(b"nvmlVgpuTypeGetNumDisplayHeads\0")
.map(|sym| *sym);
let nvmlVgpuTypeGetResolution = __library
.get(b"nvmlVgpuTypeGetResolution\0")
.map(|sym| *sym);
let nvmlVgpuTypeGetLicense = __library.get(b"nvmlVgpuTypeGetLicense\0").map(|sym| *sym);
let nvmlVgpuTypeGetFrameRateLimit = __library
.get(b"nvmlVgpuTypeGetFrameRateLimit\0")
.map(|sym| *sym);
let nvmlVgpuTypeGetMaxInstances = __library
.get(b"nvmlVgpuTypeGetMaxInstances\0")
.map(|sym| *sym);
let nvmlVgpuTypeGetMaxInstancesPerVm = __library
.get(b"nvmlVgpuTypeGetMaxInstancesPerVm\0")
.map(|sym| *sym);
let nvmlDeviceGetActiveVgpus = __library.get(b"nvmlDeviceGetActiveVgpus\0").map(|sym| *sym);
let nvmlVgpuInstanceGetVmID = __library.get(b"nvmlVgpuInstanceGetVmID\0").map(|sym| *sym);
let nvmlVgpuInstanceGetUUID = __library.get(b"nvmlVgpuInstanceGetUUID\0").map(|sym| *sym);
let nvmlVgpuInstanceGetVmDriverVersion = __library
.get(b"nvmlVgpuInstanceGetVmDriverVersion\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetFbUsage = __library
.get(b"nvmlVgpuInstanceGetFbUsage\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetLicenseStatus = __library
.get(b"nvmlVgpuInstanceGetLicenseStatus\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetType = __library.get(b"nvmlVgpuInstanceGetType\0").map(|sym| *sym);
let nvmlVgpuInstanceGetFrameRateLimit = __library
.get(b"nvmlVgpuInstanceGetFrameRateLimit\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetEccMode = __library
.get(b"nvmlVgpuInstanceGetEccMode\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetEncoderCapacity = __library
.get(b"nvmlVgpuInstanceGetEncoderCapacity\0")
.map(|sym| *sym);
let nvmlVgpuInstanceSetEncoderCapacity = __library
.get(b"nvmlVgpuInstanceSetEncoderCapacity\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetEncoderStats = __library
.get(b"nvmlVgpuInstanceGetEncoderStats\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetEncoderSessions = __library
.get(b"nvmlVgpuInstanceGetEncoderSessions\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetFBCStats = __library
.get(b"nvmlVgpuInstanceGetFBCStats\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetFBCSessions = __library
.get(b"nvmlVgpuInstanceGetFBCSessions\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetGpuInstanceId = __library
.get(b"nvmlVgpuInstanceGetGpuInstanceId\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetGpuPciId = __library
.get(b"nvmlVgpuInstanceGetGpuPciId\0")
.map(|sym| *sym);
let nvmlVgpuTypeGetCapabilities = __library
.get(b"nvmlVgpuTypeGetCapabilities\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetMetadata = __library
.get(b"nvmlVgpuInstanceGetMetadata\0")
.map(|sym| *sym);
let nvmlDeviceGetVgpuMetadata = __library
.get(b"nvmlDeviceGetVgpuMetadata\0")
.map(|sym| *sym);
let nvmlGetVgpuCompatibility = __library.get(b"nvmlGetVgpuCompatibility\0").map(|sym| *sym);
let nvmlDeviceGetPgpuMetadataString = __library
.get(b"nvmlDeviceGetPgpuMetadataString\0")
.map(|sym| *sym);
let nvmlGetVgpuVersion = __library.get(b"nvmlGetVgpuVersion\0").map(|sym| *sym);
let nvmlSetVgpuVersion = __library.get(b"nvmlSetVgpuVersion\0").map(|sym| *sym);
let nvmlDeviceGetVgpuUtilization = __library
.get(b"nvmlDeviceGetVgpuUtilization\0")
.map(|sym| *sym);
let nvmlDeviceGetVgpuProcessUtilization = __library
.get(b"nvmlDeviceGetVgpuProcessUtilization\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetAccountingMode = __library
.get(b"nvmlVgpuInstanceGetAccountingMode\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetAccountingPids = __library
.get(b"nvmlVgpuInstanceGetAccountingPids\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetAccountingStats = __library
.get(b"nvmlVgpuInstanceGetAccountingStats\0")
.map(|sym| *sym);
let nvmlVgpuInstanceClearAccountingPids = __library
.get(b"nvmlVgpuInstanceClearAccountingPids\0")
.map(|sym| *sym);
let nvmlVgpuInstanceGetLicenseInfo_v2 = __library
.get(b"nvmlVgpuInstanceGetLicenseInfo_v2\0")
.map(|sym| *sym);
let nvmlGetExcludedDeviceCount = __library
.get(b"nvmlGetExcludedDeviceCount\0")
.map(|sym| *sym);
let nvmlGetExcludedDeviceInfoByIndex = __library
.get(b"nvmlGetExcludedDeviceInfoByIndex\0")
.map(|sym| *sym);
let nvmlDeviceSetMigMode = __library.get(b"nvmlDeviceSetMigMode\0").map(|sym| *sym);
let nvmlDeviceGetMigMode = __library.get(b"nvmlDeviceGetMigMode\0").map(|sym| *sym);
let nvmlDeviceGetGpuInstanceProfileInfo = __library
.get(b"nvmlDeviceGetGpuInstanceProfileInfo\0")
.map(|sym| *sym);
let nvmlDeviceGetGpuInstanceProfileInfoV = __library
.get(b"nvmlDeviceGetGpuInstanceProfileInfoV\0")
.map(|sym| *sym);
let nvmlDeviceGetGpuInstancePossiblePlacements_v2 = __library
.get(b"nvmlDeviceGetGpuInstancePossiblePlacements_v2\0")
.map(|sym| *sym);
let nvmlDeviceGetGpuInstanceRemainingCapacity = __library
.get(b"nvmlDeviceGetGpuInstanceRemainingCapacity\0")
.map(|sym| *sym);
let nvmlDeviceCreateGpuInstance = __library
.get(b"nvmlDeviceCreateGpuInstance\0")
.map(|sym| *sym);
let nvmlDeviceCreateGpuInstanceWithPlacement = __library
.get(b"nvmlDeviceCreateGpuInstanceWithPlacement\0")
.map(|sym| *sym);
let nvmlGpuInstanceDestroy = __library.get(b"nvmlGpuInstanceDestroy\0").map(|sym| *sym);
let nvmlDeviceGetGpuInstances = __library
.get(b"nvmlDeviceGetGpuInstances\0")
.map(|sym| *sym);
let nvmlDeviceGetGpuInstanceById = __library
.get(b"nvmlDeviceGetGpuInstanceById\0")
.map(|sym| *sym);
let nvmlGpuInstanceGetInfo = __library.get(b"nvmlGpuInstanceGetInfo\0").map(|sym| *sym);
let nvmlGpuInstanceGetComputeInstanceProfileInfo = __library
.get(b"nvmlGpuInstanceGetComputeInstanceProfileInfo\0")
.map(|sym| *sym);
let nvmlGpuInstanceGetComputeInstanceProfileInfoV = __library
.get(b"nvmlGpuInstanceGetComputeInstanceProfileInfoV\0")
.map(|sym| *sym);
let nvmlGpuInstanceGetComputeInstanceRemainingCapacity = __library
.get(b"nvmlGpuInstanceGetComputeInstanceRemainingCapacity\0")
.map(|sym| *sym);
let nvmlGpuInstanceCreateComputeInstance = __library
.get(b"nvmlGpuInstanceCreateComputeInstance\0")
.map(|sym| *sym);
let nvmlComputeInstanceDestroy = __library
.get(b"nvmlComputeInstanceDestroy\0")
.map(|sym| *sym);
let nvmlGpuInstanceGetComputeInstances = __library
.get(b"nvmlGpuInstanceGetComputeInstances\0")
.map(|sym| *sym);
let nvmlGpuInstanceGetComputeInstanceById = __library
.get(b"nvmlGpuInstanceGetComputeInstanceById\0")
.map(|sym| *sym);
let nvmlComputeInstanceGetInfo_v2 = __library
.get(b"nvmlComputeInstanceGetInfo_v2\0")
.map(|sym| *sym);
let nvmlDeviceIsMigDeviceHandle = __library
.get(b"nvmlDeviceIsMigDeviceHandle\0")
.map(|sym| *sym);
let nvmlDeviceGetGpuInstanceId = __library
.get(b"nvmlDeviceGetGpuInstanceId\0")
.map(|sym| *sym);
let nvmlDeviceGetComputeInstanceId = __library
.get(b"nvmlDeviceGetComputeInstanceId\0")
.map(|sym| *sym);
let nvmlDeviceGetMaxMigDeviceCount = __library
.get(b"nvmlDeviceGetMaxMigDeviceCount\0")
.map(|sym| *sym);
let nvmlDeviceGetMigDeviceHandleByIndex = __library
.get(b"nvmlDeviceGetMigDeviceHandleByIndex\0")
.map(|sym| *sym);
let nvmlDeviceGetDeviceHandleFromMigDeviceHandle = __library
.get(b"nvmlDeviceGetDeviceHandleFromMigDeviceHandle\0")
.map(|sym| *sym);
let nvmlDeviceGetBusType = __library.get(b"nvmlDeviceGetBusType\0").map(|sym| *sym);
let nvmlDeviceGetDynamicPstatesInfo = __library
.get(b"nvmlDeviceGetDynamicPstatesInfo\0")
.map(|sym| *sym);
let nvmlDeviceSetFanSpeed_v2 = __library.get(b"nvmlDeviceSetFanSpeed_v2\0").map(|sym| *sym);
let nvmlDeviceGetGpcClkVfOffset = __library
.get(b"nvmlDeviceGetGpcClkVfOffset\0")
.map(|sym| *sym);
let nvmlDeviceSetGpcClkVfOffset = __library
.get(b"nvmlDeviceSetGpcClkVfOffset\0")
.map(|sym| *sym);
let nvmlDeviceGetMemClkVfOffset = __library
.get(b"nvmlDeviceGetMemClkVfOffset\0")
.map(|sym| *sym);
let nvmlDeviceSetMemClkVfOffset = __library
.get(b"nvmlDeviceSetMemClkVfOffset\0")
.map(|sym| *sym);
let nvmlDeviceGetMinMaxClockOfPState = __library
.get(b"nvmlDeviceGetMinMaxClockOfPState\0")
.map(|sym| *sym);
let nvmlDeviceGetSupportedPerformanceStates = __library
.get(b"nvmlDeviceGetSupportedPerformanceStates\0")
.map(|sym| *sym);
let nvmlDeviceGetGpcClkMinMaxVfOffset = __library
.get(b"nvmlDeviceGetGpcClkMinMaxVfOffset\0")
.map(|sym| *sym);
let nvmlDeviceGetMemClkMinMaxVfOffset = __library
.get(b"nvmlDeviceGetMemClkMinMaxVfOffset\0")
.map(|sym| *sym);
let nvmlGpmMetricsGet = __library.get(b"nvmlGpmMetricsGet\0").map(|sym| *sym);
let nvmlGpmSampleFree = __library.get(b"nvmlGpmSampleFree\0").map(|sym| *sym);
let nvmlGpmSampleAlloc = __library.get(b"nvmlGpmSampleAlloc\0").map(|sym| *sym);
let nvmlGpmSampleGet = __library.get(b"nvmlGpmSampleGet\0").map(|sym| *sym);
let nvmlGpmQueryDeviceSupport = __library
.get(b"nvmlGpmQueryDeviceSupport\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlInit = __library.get(b"nvmlInit\0").map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetCount = __library.get(b"nvmlDeviceGetCount\0").map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetHandleByIndex = __library
.get(b"nvmlDeviceGetHandleByIndex\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetHandleByPciBusId = __library
.get(b"nvmlDeviceGetHandleByPciBusId\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetPciInfo = __library.get(b"nvmlDeviceGetPciInfo\0").map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetPciInfo_v2 = __library.get(b"nvmlDeviceGetPciInfo_v2\0").map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetNvLinkRemotePciInfo = __library
.get(b"nvmlDeviceGetNvLinkRemotePciInfo\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetGridLicensableFeatures = __library
.get(b"nvmlDeviceGetGridLicensableFeatures\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetGridLicensableFeatures_v2 = __library
.get(b"nvmlDeviceGetGridLicensableFeatures_v2\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetGridLicensableFeatures_v3 = __library
.get(b"nvmlDeviceGetGridLicensableFeatures_v3\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceRemoveGpu = __library.get(b"nvmlDeviceRemoveGpu\0").map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlEventSetWait = __library.get(b"nvmlEventSetWait\0").map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetAttributes = __library.get(b"nvmlDeviceGetAttributes\0").map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlComputeInstanceGetInfo = __library
.get(b"nvmlComputeInstanceGetInfo\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetComputeRunningProcesses = __library
.get(b"nvmlDeviceGetComputeRunningProcesses\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetComputeRunningProcesses_v2 = __library
.get(b"nvmlDeviceGetComputeRunningProcesses_v2\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetGraphicsRunningProcesses = __library
.get(b"nvmlDeviceGetGraphicsRunningProcesses\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetGraphicsRunningProcesses_v2 = __library
.get(b"nvmlDeviceGetGraphicsRunningProcesses_v2\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetMPSComputeRunningProcesses = __library
.get(b"nvmlDeviceGetMPSComputeRunningProcesses\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetMPSComputeRunningProcesses_v2 = __library
.get(b"nvmlDeviceGetMPSComputeRunningProcesses_v2\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlDeviceGetGpuInstancePossiblePlacements = __library
.get(b"nvmlDeviceGetGpuInstancePossiblePlacements\0")
.map(|sym| *sym);
#[cfg(feature = "legacy-functions")]
let nvmlVgpuInstanceGetLicenseInfo = __library
.get(b"nvmlVgpuInstanceGetLicenseInfo\0")
.map(|sym| *sym);
Ok(NvmlLib {
__library,
nvmlInit_v2,
nvmlInitWithFlags,
nvmlShutdown,
nvmlErrorString,
nvmlSystemGetDriverVersion,
nvmlSystemGetNVMLVersion,
nvmlSystemGetCudaDriverVersion,
nvmlSystemGetCudaDriverVersion_v2,
nvmlSystemGetProcessName,
nvmlUnitGetCount,
nvmlUnitGetHandleByIndex,
nvmlUnitGetUnitInfo,
nvmlUnitGetLedState,
nvmlUnitGetPsuInfo,
nvmlUnitGetTemperature,
nvmlUnitGetFanSpeedInfo,
nvmlUnitGetDevices,
nvmlSystemGetHicVersion,
nvmlDeviceGetCount_v2,
nvmlDeviceGetAttributes_v2,
nvmlDeviceGetHandleByIndex_v2,
nvmlDeviceGetHandleBySerial,
nvmlDeviceGetHandleByUUID,
nvmlDeviceGetHandleByPciBusId_v2,
nvmlDeviceGetName,
nvmlDeviceGetBrand,
nvmlDeviceGetIndex,
nvmlDeviceGetSerial,
nvmlDeviceGetMemoryAffinity,
nvmlDeviceGetCpuAffinityWithinScope,
nvmlDeviceGetCpuAffinity,
nvmlDeviceSetCpuAffinity,
nvmlDeviceClearCpuAffinity,
nvmlDeviceGetTopologyCommonAncestor,
nvmlDeviceGetTopologyNearestGpus,
nvmlSystemGetTopologyGpuSet,
nvmlDeviceGetP2PStatus,
nvmlDeviceGetUUID,
nvmlVgpuInstanceGetMdevUUID,
nvmlDeviceGetMinorNumber,
nvmlDeviceGetBoardPartNumber,
nvmlDeviceGetInforomVersion,
nvmlDeviceGetInforomImageVersion,
nvmlDeviceGetInforomConfigurationChecksum,
nvmlDeviceValidateInforom,
nvmlDeviceGetDisplayMode,
nvmlDeviceGetDisplayActive,
nvmlDeviceGetPersistenceMode,
nvmlDeviceGetPciInfo_v3,
nvmlDeviceGetMaxPcieLinkGeneration,
nvmlDeviceGetMaxPcieLinkWidth,
nvmlDeviceGetCurrPcieLinkGeneration,
nvmlDeviceGetCurrPcieLinkWidth,
nvmlDeviceGetPcieThroughput,
nvmlDeviceGetPcieReplayCounter,
nvmlDeviceGetClockInfo,
nvmlDeviceGetMaxClockInfo,
nvmlDeviceGetApplicationsClock,
nvmlDeviceGetDefaultApplicationsClock,
nvmlDeviceResetApplicationsClocks,
nvmlDeviceGetClock,
nvmlDeviceGetMaxCustomerBoostClock,
nvmlDeviceGetSupportedMemoryClocks,
nvmlDeviceGetSupportedGraphicsClocks,
nvmlDeviceGetAutoBoostedClocksEnabled,
nvmlDeviceSetAutoBoostedClocksEnabled,
nvmlDeviceSetDefaultAutoBoostedClocksEnabled,
nvmlDeviceGetFanSpeed,
nvmlDeviceGetFanSpeed_v2,
nvmlDeviceGetTargetFanSpeed,
nvmlDeviceSetDefaultFanSpeed_v2,
nvmlDeviceGetMinMaxFanSpeed,
nvmlDeviceGetNumFans,
nvmlDeviceGetTemperature,
nvmlDeviceGetTemperatureThreshold,
nvmlDeviceSetTemperatureThreshold,
nvmlDeviceGetThermalSettings,
nvmlDeviceGetPerformanceState,
nvmlDeviceGetCurrentClocksThrottleReasons,
nvmlDeviceGetSupportedClocksThrottleReasons,
nvmlDeviceGetPowerState,
nvmlDeviceGetPowerManagementMode,
nvmlDeviceGetPowerManagementLimit,
nvmlDeviceGetPowerManagementLimitConstraints,
nvmlDeviceGetPowerManagementDefaultLimit,
nvmlDeviceGetPowerUsage,
nvmlDeviceGetPowerMode,
nvmlDeviceGetSupportedPowerModes,
nvmlDeviceSetPowerMode,
nvmlDeviceGetTotalEnergyConsumption,
nvmlDeviceGetEnforcedPowerLimit,
nvmlDeviceGetGpuOperationMode,
nvmlDeviceGetMemoryInfo,
nvmlDeviceGetMemoryInfo_v2,
nvmlDeviceGetComputeMode,
nvmlDeviceGetCudaComputeCapability,
nvmlDeviceGetEccMode,
nvmlDeviceGetDefaultEccMode,
nvmlDeviceGetBoardId,
nvmlDeviceGetMultiGpuBoard,
nvmlDeviceGetTotalEccErrors,
nvmlDeviceGetDetailedEccErrors,
nvmlDeviceGetMemoryErrorCounter,
nvmlDeviceGetUtilizationRates,
nvmlDeviceGetEncoderUtilization,
nvmlDeviceGetEncoderCapacity,
nvmlDeviceGetEncoderStats,
nvmlDeviceGetEncoderSessions,
nvmlDeviceGetDecoderUtilization,
nvmlDeviceGetFBCStats,
nvmlDeviceGetFBCSessions,
nvmlDeviceGetDriverModel,
nvmlDeviceGetVbiosVersion,
nvmlDeviceGetBridgeChipInfo,
nvmlDeviceGetComputeRunningProcesses_v3,
nvmlDeviceGetGraphicsRunningProcesses_v3,
nvmlDeviceGetMPSComputeRunningProcesses_v3,
nvmlDeviceOnSameBoard,
nvmlDeviceGetAPIRestriction,
nvmlDeviceGetSamples,
nvmlDeviceGetBAR1MemoryInfo,
nvmlDeviceGetViolationStatus,
nvmlDeviceGetIrqNum,
nvmlDeviceGetNumGpuCores,
nvmlDeviceGetPowerSource,
nvmlDeviceGetMemoryBusWidth,
nvmlDeviceGetPcieLinkMaxSpeed,
nvmlDeviceGetPcieSpeed,
nvmlDeviceGetAdaptiveClockInfoStatus,
nvmlDeviceGetAccountingMode,
nvmlDeviceGetAccountingStats,
nvmlDeviceGetAccountingPids,
nvmlDeviceGetAccountingBufferSize,
nvmlDeviceGetRetiredPages,
nvmlDeviceGetRetiredPages_v2,
nvmlDeviceGetRetiredPagesPendingStatus,
nvmlDeviceGetRemappedRows,
nvmlDeviceGetRowRemapperHistogram,
nvmlDeviceGetArchitecture,
nvmlUnitSetLedState,
nvmlDeviceSetPersistenceMode,
nvmlDeviceSetComputeMode,
nvmlDeviceSetEccMode,
nvmlDeviceClearEccErrorCounts,
nvmlDeviceSetDriverModel,
nvmlDeviceSetGpuLockedClocks,
nvmlDeviceResetGpuLockedClocks,
nvmlDeviceSetMemoryLockedClocks,
nvmlDeviceResetMemoryLockedClocks,
nvmlDeviceSetApplicationsClocks,
nvmlDeviceGetClkMonStatus,
nvmlDeviceSetPowerManagementLimit,
nvmlDeviceSetGpuOperationMode,
nvmlDeviceSetAPIRestriction,
nvmlDeviceSetAccountingMode,
nvmlDeviceClearAccountingPids,
nvmlDeviceGetNvLinkState,
nvmlDeviceGetNvLinkVersion,
nvmlDeviceGetNvLinkCapability,
nvmlDeviceGetNvLinkRemotePciInfo_v2,
nvmlDeviceGetNvLinkErrorCounter,
nvmlDeviceResetNvLinkErrorCounters,
nvmlDeviceSetNvLinkUtilizationControl,
nvmlDeviceGetNvLinkUtilizationControl,
nvmlDeviceGetNvLinkUtilizationCounter,
nvmlDeviceFreezeNvLinkUtilizationCounter,
nvmlDeviceResetNvLinkUtilizationCounter,
nvmlDeviceGetNvLinkRemoteDeviceType,
nvmlEventSetCreate,
nvmlDeviceRegisterEvents,
nvmlDeviceGetSupportedEventTypes,
nvmlEventSetWait_v2,
nvmlEventSetFree,
nvmlDeviceModifyDrainState,
nvmlDeviceQueryDrainState,
nvmlDeviceRemoveGpu_v2,
nvmlDeviceDiscoverGpus,
nvmlDeviceGetFieldValues,
nvmlDeviceGetVirtualizationMode,
nvmlDeviceGetHostVgpuMode,
nvmlDeviceSetVirtualizationMode,
nvmlDeviceGetGridLicensableFeatures_v4,
nvmlDeviceGetProcessUtilization,
nvmlDeviceGetGspFirmwareVersion,
nvmlDeviceGetGspFirmwareMode,
nvmlDeviceGetSupportedVgpus,
nvmlDeviceGetCreatableVgpus,
nvmlVgpuTypeGetClass,
nvmlVgpuTypeGetName,
nvmlVgpuTypeGetGpuInstanceProfileId,
nvmlVgpuTypeGetDeviceID,
nvmlVgpuTypeGetFramebufferSize,
nvmlVgpuTypeGetNumDisplayHeads,
nvmlVgpuTypeGetResolution,
nvmlVgpuTypeGetLicense,
nvmlVgpuTypeGetFrameRateLimit,
nvmlVgpuTypeGetMaxInstances,
nvmlVgpuTypeGetMaxInstancesPerVm,
nvmlDeviceGetActiveVgpus,
nvmlVgpuInstanceGetVmID,
nvmlVgpuInstanceGetUUID,
nvmlVgpuInstanceGetVmDriverVersion,
nvmlVgpuInstanceGetFbUsage,
nvmlVgpuInstanceGetLicenseStatus,
nvmlVgpuInstanceGetType,
nvmlVgpuInstanceGetFrameRateLimit,
nvmlVgpuInstanceGetEccMode,
nvmlVgpuInstanceGetEncoderCapacity,
nvmlVgpuInstanceSetEncoderCapacity,
nvmlVgpuInstanceGetEncoderStats,
nvmlVgpuInstanceGetEncoderSessions,
nvmlVgpuInstanceGetFBCStats,
nvmlVgpuInstanceGetFBCSessions,
nvmlVgpuInstanceGetGpuInstanceId,
nvmlVgpuInstanceGetGpuPciId,
nvmlVgpuTypeGetCapabilities,
nvmlVgpuInstanceGetMetadata,
nvmlDeviceGetVgpuMetadata,
nvmlGetVgpuCompatibility,
nvmlDeviceGetPgpuMetadataString,
nvmlGetVgpuVersion,
nvmlSetVgpuVersion,
nvmlDeviceGetVgpuUtilization,
nvmlDeviceGetVgpuProcessUtilization,
nvmlVgpuInstanceGetAccountingMode,
nvmlVgpuInstanceGetAccountingPids,
nvmlVgpuInstanceGetAccountingStats,
nvmlVgpuInstanceClearAccountingPids,
nvmlVgpuInstanceGetLicenseInfo_v2,
nvmlGetExcludedDeviceCount,
nvmlGetExcludedDeviceInfoByIndex,
nvmlDeviceSetMigMode,
nvmlDeviceGetMigMode,
nvmlDeviceGetGpuInstanceProfileInfo,
nvmlDeviceGetGpuInstanceProfileInfoV,
nvmlDeviceGetGpuInstancePossiblePlacements_v2,
nvmlDeviceGetGpuInstanceRemainingCapacity,
nvmlDeviceCreateGpuInstance,
nvmlDeviceCreateGpuInstanceWithPlacement,
nvmlGpuInstanceDestroy,
nvmlDeviceGetGpuInstances,
nvmlDeviceGetGpuInstanceById,
nvmlGpuInstanceGetInfo,
nvmlGpuInstanceGetComputeInstanceProfileInfo,
nvmlGpuInstanceGetComputeInstanceProfileInfoV,
nvmlGpuInstanceGetComputeInstanceRemainingCapacity,
nvmlGpuInstanceCreateComputeInstance,
nvmlComputeInstanceDestroy,
nvmlGpuInstanceGetComputeInstances,
nvmlGpuInstanceGetComputeInstanceById,
nvmlComputeInstanceGetInfo_v2,
nvmlDeviceIsMigDeviceHandle,
nvmlDeviceGetGpuInstanceId,
nvmlDeviceGetComputeInstanceId,
nvmlDeviceGetMaxMigDeviceCount,
nvmlDeviceGetMigDeviceHandleByIndex,
nvmlDeviceGetDeviceHandleFromMigDeviceHandle,
nvmlDeviceGetBusType,
nvmlDeviceGetDynamicPstatesInfo,
nvmlDeviceSetFanSpeed_v2,
nvmlDeviceGetGpcClkVfOffset,
nvmlDeviceSetGpcClkVfOffset,
nvmlDeviceGetMemClkVfOffset,
nvmlDeviceSetMemClkVfOffset,
nvmlDeviceGetMinMaxClockOfPState,
nvmlDeviceGetSupportedPerformanceStates,
nvmlDeviceGetGpcClkMinMaxVfOffset,
nvmlDeviceGetMemClkMinMaxVfOffset,
nvmlGpmMetricsGet,
nvmlGpmSampleFree,
nvmlGpmSampleAlloc,
nvmlGpmSampleGet,
nvmlGpmQueryDeviceSupport,
#[cfg(feature = "legacy-functions")]
nvmlInit,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetCount,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetHandleByIndex,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetHandleByPciBusId,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetPciInfo,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetPciInfo_v2,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetNvLinkRemotePciInfo,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetGridLicensableFeatures,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetGridLicensableFeatures_v2,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetGridLicensableFeatures_v3,
#[cfg(feature = "legacy-functions")]
nvmlDeviceRemoveGpu,
#[cfg(feature = "legacy-functions")]
nvmlEventSetWait,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetAttributes,
#[cfg(feature = "legacy-functions")]
nvmlComputeInstanceGetInfo,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetComputeRunningProcesses,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetComputeRunningProcesses_v2,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetGraphicsRunningProcesses,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetGraphicsRunningProcesses_v2,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetMPSComputeRunningProcesses,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetMPSComputeRunningProcesses_v2,
#[cfg(feature = "legacy-functions")]
nvmlDeviceGetGpuInstancePossiblePlacements,
#[cfg(feature = "legacy-functions")]
nvmlVgpuInstanceGetLicenseInfo,
})
}
pub unsafe fn nvmlInit_v2(&self) -> nvmlReturn_t {
(self
.nvmlInit_v2
.as_ref()
.expect("Expected function, got error."))()
}
pub unsafe fn nvmlInitWithFlags(&self, flags: raw::c_uint) -> nvmlReturn_t {
(self
.nvmlInitWithFlags
.as_ref()
.expect("Expected function, got error."))(flags)
}
pub unsafe fn nvmlShutdown(&self) -> nvmlReturn_t {
(self
.nvmlShutdown
.as_ref()
.expect("Expected function, got error."))()
}
pub unsafe fn nvmlErrorString(&self, result: nvmlReturn_t) -> *const raw::c_char {
(self
.nvmlErrorString
.as_ref()
.expect("Expected function, got error."))(result)
}
pub unsafe fn nvmlSystemGetDriverVersion(
&self,
version: *mut raw::c_char,
length: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlSystemGetDriverVersion
.as_ref()
.expect("Expected function, got error."))(version, length)
}
pub unsafe fn nvmlSystemGetNVMLVersion(
&self,
version: *mut raw::c_char,
length: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlSystemGetNVMLVersion
.as_ref()
.expect("Expected function, got error."))(version, length)
}
pub unsafe fn nvmlSystemGetCudaDriverVersion(
&self,
cudaDriverVersion: *mut raw::c_int,
) -> nvmlReturn_t {
(self
.nvmlSystemGetCudaDriverVersion
.as_ref()
.expect("Expected function, got error."))(cudaDriverVersion)
}
pub unsafe fn nvmlSystemGetCudaDriverVersion_v2(
&self,
cudaDriverVersion: *mut raw::c_int,
) -> nvmlReturn_t {
(self
.nvmlSystemGetCudaDriverVersion_v2
.as_ref()
.expect("Expected function, got error."))(cudaDriverVersion)
}
pub unsafe fn nvmlSystemGetProcessName(
&self,
pid: raw::c_uint,
name: *mut raw::c_char,
length: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlSystemGetProcessName
.as_ref()
.expect("Expected function, got error."))(pid, name, length)
}
pub unsafe fn nvmlUnitGetCount(&self, unitCount: *mut raw::c_uint) -> nvmlReturn_t {
(self
.nvmlUnitGetCount
.as_ref()
.expect("Expected function, got error."))(unitCount)
}
pub unsafe fn nvmlUnitGetHandleByIndex(
&self,
index: raw::c_uint,
unit: *mut nvmlUnit_t,
) -> nvmlReturn_t {
(self
.nvmlUnitGetHandleByIndex
.as_ref()
.expect("Expected function, got error."))(index, unit)
}
pub unsafe fn nvmlUnitGetUnitInfo(
&self,
unit: nvmlUnit_t,
info: *mut nvmlUnitInfo_t,
) -> nvmlReturn_t {
(self
.nvmlUnitGetUnitInfo
.as_ref()
.expect("Expected function, got error."))(unit, info)
}
pub unsafe fn nvmlUnitGetLedState(
&self,
unit: nvmlUnit_t,
state: *mut nvmlLedState_t,
) -> nvmlReturn_t {
(self
.nvmlUnitGetLedState
.as_ref()
.expect("Expected function, got error."))(unit, state)
}
pub unsafe fn nvmlUnitGetPsuInfo(
&self,
unit: nvmlUnit_t,
psu: *mut nvmlPSUInfo_t,
) -> nvmlReturn_t {
(self
.nvmlUnitGetPsuInfo
.as_ref()
.expect("Expected function, got error."))(unit, psu)
}
pub unsafe fn nvmlUnitGetTemperature(
&self,
unit: nvmlUnit_t,
type_: raw::c_uint,
temp: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlUnitGetTemperature
.as_ref()
.expect("Expected function, got error."))(unit, type_, temp)
}
pub unsafe fn nvmlUnitGetFanSpeedInfo(
&self,
unit: nvmlUnit_t,
fanSpeeds: *mut nvmlUnitFanSpeeds_t,
) -> nvmlReturn_t {
(self
.nvmlUnitGetFanSpeedInfo
.as_ref()
.expect("Expected function, got error."))(unit, fanSpeeds)
}
pub unsafe fn nvmlUnitGetDevices(
&self,
unit: nvmlUnit_t,
deviceCount: *mut raw::c_uint,
devices: *mut nvmlDevice_t,
) -> nvmlReturn_t {
(self
.nvmlUnitGetDevices
.as_ref()
.expect("Expected function, got error."))(unit, deviceCount, devices)
}
pub unsafe fn nvmlSystemGetHicVersion(
&self,
hwbcCount: *mut raw::c_uint,
hwbcEntries: *mut nvmlHwbcEntry_t,
) -> nvmlReturn_t {
(self
.nvmlSystemGetHicVersion
.as_ref()
.expect("Expected function, got error."))(hwbcCount, hwbcEntries)
}
pub unsafe fn nvmlDeviceGetCount_v2(&self, deviceCount: *mut raw::c_uint) -> nvmlReturn_t {
(self
.nvmlDeviceGetCount_v2
.as_ref()
.expect("Expected function, got error."))(deviceCount)
}
pub unsafe fn nvmlDeviceGetAttributes_v2(
&self,
device: nvmlDevice_t,
attributes: *mut nvmlDeviceAttributes_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetAttributes_v2
.as_ref()
.expect("Expected function, got error."))(device, attributes)
}
pub unsafe fn nvmlDeviceGetHandleByIndex_v2(
&self,
index: raw::c_uint,
device: *mut nvmlDevice_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetHandleByIndex_v2
.as_ref()
.expect("Expected function, got error."))(index, device)
}
pub unsafe fn nvmlDeviceGetHandleBySerial(
&self,
serial: *const raw::c_char,
device: *mut nvmlDevice_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetHandleBySerial
.as_ref()
.expect("Expected function, got error."))(serial, device)
}
pub unsafe fn nvmlDeviceGetHandleByUUID(
&self,
uuid: *const raw::c_char,
device: *mut nvmlDevice_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetHandleByUUID
.as_ref()
.expect("Expected function, got error."))(uuid, device)
}
pub unsafe fn nvmlDeviceGetHandleByPciBusId_v2(
&self,
pciBusId: *const raw::c_char,
device: *mut nvmlDevice_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetHandleByPciBusId_v2
.as_ref()
.expect("Expected function, got error."))(pciBusId, device)
}
pub unsafe fn nvmlDeviceGetName(
&self,
device: nvmlDevice_t,
name: *mut raw::c_char,
length: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetName
.as_ref()
.expect("Expected function, got error."))(device, name, length)
}
pub unsafe fn nvmlDeviceGetBrand(
&self,
device: nvmlDevice_t,
type_: *mut nvmlBrandType_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetBrand
.as_ref()
.expect("Expected function, got error."))(device, type_)
}
pub unsafe fn nvmlDeviceGetIndex(
&self,
device: nvmlDevice_t,
index: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetIndex
.as_ref()
.expect("Expected function, got error."))(device, index)
}
pub unsafe fn nvmlDeviceGetSerial(
&self,
device: nvmlDevice_t,
serial: *mut raw::c_char,
length: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetSerial
.as_ref()
.expect("Expected function, got error."))(device, serial, length)
}
pub unsafe fn nvmlDeviceGetMemoryAffinity(
&self,
device: nvmlDevice_t,
nodeSetSize: raw::c_uint,
nodeSet: *mut raw::c_ulong,
scope: nvmlAffinityScope_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMemoryAffinity
.as_ref()
.expect("Expected function, got error."))(device, nodeSetSize, nodeSet, scope)
}
pub unsafe fn nvmlDeviceGetCpuAffinityWithinScope(
&self,
device: nvmlDevice_t,
cpuSetSize: raw::c_uint,
cpuSet: *mut raw::c_ulong,
scope: nvmlAffinityScope_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetCpuAffinityWithinScope
.as_ref()
.expect("Expected function, got error."))(device, cpuSetSize, cpuSet, scope)
}
pub unsafe fn nvmlDeviceGetCpuAffinity(
&self,
device: nvmlDevice_t,
cpuSetSize: raw::c_uint,
cpuSet: *mut raw::c_ulong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetCpuAffinity
.as_ref()
.expect("Expected function, got error."))(device, cpuSetSize, cpuSet)
}
pub unsafe fn nvmlDeviceSetCpuAffinity(&self, device: nvmlDevice_t) -> nvmlReturn_t {
(self
.nvmlDeviceSetCpuAffinity
.as_ref()
.expect("Expected function, got error."))(device)
}
pub unsafe fn nvmlDeviceClearCpuAffinity(&self, device: nvmlDevice_t) -> nvmlReturn_t {
(self
.nvmlDeviceClearCpuAffinity
.as_ref()
.expect("Expected function, got error."))(device)
}
pub unsafe fn nvmlDeviceGetTopologyCommonAncestor(
&self,
device1: nvmlDevice_t,
device2: nvmlDevice_t,
pathInfo: *mut nvmlGpuTopologyLevel_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetTopologyCommonAncestor
.as_ref()
.expect("Expected function, got error."))(device1, device2, pathInfo)
}
pub unsafe fn nvmlDeviceGetTopologyNearestGpus(
&self,
device: nvmlDevice_t,
level: nvmlGpuTopologyLevel_t,
count: *mut raw::c_uint,
deviceArray: *mut nvmlDevice_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetTopologyNearestGpus
.as_ref()
.expect("Expected function, got error."))(device, level, count, deviceArray)
}
pub unsafe fn nvmlSystemGetTopologyGpuSet(
&self,
cpuNumber: raw::c_uint,
count: *mut raw::c_uint,
deviceArray: *mut nvmlDevice_t,
) -> nvmlReturn_t {
(self
.nvmlSystemGetTopologyGpuSet
.as_ref()
.expect("Expected function, got error."))(cpuNumber, count, deviceArray)
}
pub unsafe fn nvmlDeviceGetP2PStatus(
&self,
device1: nvmlDevice_t,
device2: nvmlDevice_t,
p2pIndex: nvmlGpuP2PCapsIndex_t,
p2pStatus: *mut nvmlGpuP2PStatus_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetP2PStatus
.as_ref()
.expect("Expected function, got error."))(device1, device2, p2pIndex, p2pStatus)
}
pub unsafe fn nvmlDeviceGetUUID(
&self,
device: nvmlDevice_t,
uuid: *mut raw::c_char,
length: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetUUID
.as_ref()
.expect("Expected function, got error."))(device, uuid, length)
}
pub unsafe fn nvmlVgpuInstanceGetMdevUUID(
&self,
vgpuInstance: nvmlVgpuInstance_t,
mdevUuid: *mut raw::c_char,
size: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetMdevUUID
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, mdevUuid, size)
}
pub unsafe fn nvmlDeviceGetMinorNumber(
&self,
device: nvmlDevice_t,
minorNumber: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMinorNumber
.as_ref()
.expect("Expected function, got error."))(device, minorNumber)
}
pub unsafe fn nvmlDeviceGetBoardPartNumber(
&self,
device: nvmlDevice_t,
partNumber: *mut raw::c_char,
length: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetBoardPartNumber
.as_ref()
.expect("Expected function, got error."))(device, partNumber, length)
}
pub unsafe fn nvmlDeviceGetInforomVersion(
&self,
device: nvmlDevice_t,
object: nvmlInforomObject_t,
version: *mut raw::c_char,
length: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetInforomVersion
.as_ref()
.expect("Expected function, got error."))(device, object, version, length)
}
pub unsafe fn nvmlDeviceGetInforomImageVersion(
&self,
device: nvmlDevice_t,
version: *mut raw::c_char,
length: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetInforomImageVersion
.as_ref()
.expect("Expected function, got error."))(device, version, length)
}
pub unsafe fn nvmlDeviceGetInforomConfigurationChecksum(
&self,
device: nvmlDevice_t,
checksum: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetInforomConfigurationChecksum
.as_ref()
.expect("Expected function, got error."))(device, checksum)
}
pub unsafe fn nvmlDeviceValidateInforom(&self, device: nvmlDevice_t) -> nvmlReturn_t {
(self
.nvmlDeviceValidateInforom
.as_ref()
.expect("Expected function, got error."))(device)
}
pub unsafe fn nvmlDeviceGetDisplayMode(
&self,
device: nvmlDevice_t,
display: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetDisplayMode
.as_ref()
.expect("Expected function, got error."))(device, display)
}
pub unsafe fn nvmlDeviceGetDisplayActive(
&self,
device: nvmlDevice_t,
isActive: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetDisplayActive
.as_ref()
.expect("Expected function, got error."))(device, isActive)
}
pub unsafe fn nvmlDeviceGetPersistenceMode(
&self,
device: nvmlDevice_t,
mode: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPersistenceMode
.as_ref()
.expect("Expected function, got error."))(device, mode)
}
pub unsafe fn nvmlDeviceGetPciInfo_v3(
&self,
device: nvmlDevice_t,
pci: *mut nvmlPciInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPciInfo_v3
.as_ref()
.expect("Expected function, got error."))(device, pci)
}
pub unsafe fn nvmlDeviceGetMaxPcieLinkGeneration(
&self,
device: nvmlDevice_t,
maxLinkGen: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMaxPcieLinkGeneration
.as_ref()
.expect("Expected function, got error."))(device, maxLinkGen)
}
pub unsafe fn nvmlDeviceGetMaxPcieLinkWidth(
&self,
device: nvmlDevice_t,
maxLinkWidth: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMaxPcieLinkWidth
.as_ref()
.expect("Expected function, got error."))(device, maxLinkWidth)
}
pub unsafe fn nvmlDeviceGetCurrPcieLinkGeneration(
&self,
device: nvmlDevice_t,
currLinkGen: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetCurrPcieLinkGeneration
.as_ref()
.expect("Expected function, got error."))(device, currLinkGen)
}
pub unsafe fn nvmlDeviceGetCurrPcieLinkWidth(
&self,
device: nvmlDevice_t,
currLinkWidth: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetCurrPcieLinkWidth
.as_ref()
.expect("Expected function, got error."))(device, currLinkWidth)
}
pub unsafe fn nvmlDeviceGetPcieThroughput(
&self,
device: nvmlDevice_t,
counter: nvmlPcieUtilCounter_t,
value: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPcieThroughput
.as_ref()
.expect("Expected function, got error."))(device, counter, value)
}
pub unsafe fn nvmlDeviceGetPcieReplayCounter(
&self,
device: nvmlDevice_t,
value: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPcieReplayCounter
.as_ref()
.expect("Expected function, got error."))(device, value)
}
pub unsafe fn nvmlDeviceGetClockInfo(
&self,
device: nvmlDevice_t,
type_: nvmlClockType_t,
clock: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetClockInfo
.as_ref()
.expect("Expected function, got error."))(device, type_, clock)
}
pub unsafe fn nvmlDeviceGetMaxClockInfo(
&self,
device: nvmlDevice_t,
type_: nvmlClockType_t,
clock: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMaxClockInfo
.as_ref()
.expect("Expected function, got error."))(device, type_, clock)
}
pub unsafe fn nvmlDeviceGetApplicationsClock(
&self,
device: nvmlDevice_t,
clockType: nvmlClockType_t,
clockMHz: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetApplicationsClock
.as_ref()
.expect("Expected function, got error."))(device, clockType, clockMHz)
}
pub unsafe fn nvmlDeviceGetDefaultApplicationsClock(
&self,
device: nvmlDevice_t,
clockType: nvmlClockType_t,
clockMHz: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetDefaultApplicationsClock
.as_ref()
.expect("Expected function, got error."))(device, clockType, clockMHz)
}
pub unsafe fn nvmlDeviceResetApplicationsClocks(&self, device: nvmlDevice_t) -> nvmlReturn_t {
(self
.nvmlDeviceResetApplicationsClocks
.as_ref()
.expect("Expected function, got error."))(device)
}
pub unsafe fn nvmlDeviceGetClock(
&self,
device: nvmlDevice_t,
clockType: nvmlClockType_t,
clockId: nvmlClockId_t,
clockMHz: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetClock
.as_ref()
.expect("Expected function, got error."))(device, clockType, clockId, clockMHz)
}
pub unsafe fn nvmlDeviceGetMaxCustomerBoostClock(
&self,
device: nvmlDevice_t,
clockType: nvmlClockType_t,
clockMHz: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMaxCustomerBoostClock
.as_ref()
.expect("Expected function, got error."))(device, clockType, clockMHz)
}
pub unsafe fn nvmlDeviceGetSupportedMemoryClocks(
&self,
device: nvmlDevice_t,
count: *mut raw::c_uint,
clocksMHz: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetSupportedMemoryClocks
.as_ref()
.expect("Expected function, got error."))(device, count, clocksMHz)
}
pub unsafe fn nvmlDeviceGetSupportedGraphicsClocks(
&self,
device: nvmlDevice_t,
memoryClockMHz: raw::c_uint,
count: *mut raw::c_uint,
clocksMHz: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetSupportedGraphicsClocks
.as_ref()
.expect("Expected function, got error."))(
device, memoryClockMHz, count, clocksMHz
)
}
pub unsafe fn nvmlDeviceGetAutoBoostedClocksEnabled(
&self,
device: nvmlDevice_t,
isEnabled: *mut nvmlEnableState_t,
defaultIsEnabled: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetAutoBoostedClocksEnabled
.as_ref()
.expect("Expected function, got error."))(device, isEnabled, defaultIsEnabled)
}
pub unsafe fn nvmlDeviceSetAutoBoostedClocksEnabled(
&self,
device: nvmlDevice_t,
enabled: nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetAutoBoostedClocksEnabled
.as_ref()
.expect("Expected function, got error."))(device, enabled)
}
pub unsafe fn nvmlDeviceSetDefaultAutoBoostedClocksEnabled(
&self,
device: nvmlDevice_t,
enabled: nvmlEnableState_t,
flags: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetDefaultAutoBoostedClocksEnabled
.as_ref()
.expect("Expected function, got error."))(device, enabled, flags)
}
pub unsafe fn nvmlDeviceGetFanSpeed(
&self,
device: nvmlDevice_t,
speed: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetFanSpeed
.as_ref()
.expect("Expected function, got error."))(device, speed)
}
pub unsafe fn nvmlDeviceGetFanSpeed_v2(
&self,
device: nvmlDevice_t,
fan: raw::c_uint,
speed: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetFanSpeed_v2
.as_ref()
.expect("Expected function, got error."))(device, fan, speed)
}
pub unsafe fn nvmlDeviceGetTargetFanSpeed(
&self,
device: nvmlDevice_t,
fan: raw::c_uint,
targetSpeed: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetTargetFanSpeed
.as_ref()
.expect("Expected function, got error."))(device, fan, targetSpeed)
}
pub unsafe fn nvmlDeviceSetDefaultFanSpeed_v2(
&self,
device: nvmlDevice_t,
fan: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetDefaultFanSpeed_v2
.as_ref()
.expect("Expected function, got error."))(device, fan)
}
pub unsafe fn nvmlDeviceGetMinMaxFanSpeed(
&self,
device: nvmlDevice_t,
minSpeed: *mut raw::c_uint,
maxSpeed: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMinMaxFanSpeed
.as_ref()
.expect("Expected function, got error."))(device, minSpeed, maxSpeed)
}
pub unsafe fn nvmlDeviceGetNumFans(
&self,
device: nvmlDevice_t,
numFans: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetNumFans
.as_ref()
.expect("Expected function, got error."))(device, numFans)
}
pub unsafe fn nvmlDeviceGetTemperature(
&self,
device: nvmlDevice_t,
sensorType: nvmlTemperatureSensors_t,
temp: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetTemperature
.as_ref()
.expect("Expected function, got error."))(device, sensorType, temp)
}
pub unsafe fn nvmlDeviceGetTemperatureThreshold(
&self,
device: nvmlDevice_t,
thresholdType: nvmlTemperatureThresholds_t,
temp: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetTemperatureThreshold
.as_ref()
.expect("Expected function, got error."))(device, thresholdType, temp)
}
pub unsafe fn nvmlDeviceSetTemperatureThreshold(
&self,
device: nvmlDevice_t,
thresholdType: nvmlTemperatureThresholds_t,
temp: *mut raw::c_int,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetTemperatureThreshold
.as_ref()
.expect("Expected function, got error."))(device, thresholdType, temp)
}
pub unsafe fn nvmlDeviceGetThermalSettings(
&self,
device: nvmlDevice_t,
sensorIndex: raw::c_uint,
pThermalSettings: *mut nvmlGpuThermalSettings_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetThermalSettings
.as_ref()
.expect("Expected function, got error."))(device, sensorIndex, pThermalSettings)
}
pub unsafe fn nvmlDeviceGetPerformanceState(
&self,
device: nvmlDevice_t,
pState: *mut nvmlPstates_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPerformanceState
.as_ref()
.expect("Expected function, got error."))(device, pState)
}
pub unsafe fn nvmlDeviceGetCurrentClocksThrottleReasons(
&self,
device: nvmlDevice_t,
clocksThrottleReasons: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetCurrentClocksThrottleReasons
.as_ref()
.expect("Expected function, got error."))(device, clocksThrottleReasons)
}
pub unsafe fn nvmlDeviceGetSupportedClocksThrottleReasons(
&self,
device: nvmlDevice_t,
supportedClocksThrottleReasons: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetSupportedClocksThrottleReasons
.as_ref()
.expect("Expected function, got error."))(device, supportedClocksThrottleReasons)
}
pub unsafe fn nvmlDeviceGetPowerState(
&self,
device: nvmlDevice_t,
pState: *mut nvmlPstates_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPowerState
.as_ref()
.expect("Expected function, got error."))(device, pState)
}
pub unsafe fn nvmlDeviceGetPowerManagementMode(
&self,
device: nvmlDevice_t,
mode: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPowerManagementMode
.as_ref()
.expect("Expected function, got error."))(device, mode)
}
pub unsafe fn nvmlDeviceGetPowerManagementLimit(
&self,
device: nvmlDevice_t,
limit: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPowerManagementLimit
.as_ref()
.expect("Expected function, got error."))(device, limit)
}
pub unsafe fn nvmlDeviceGetPowerManagementLimitConstraints(
&self,
device: nvmlDevice_t,
minLimit: *mut raw::c_uint,
maxLimit: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPowerManagementLimitConstraints
.as_ref()
.expect("Expected function, got error."))(device, minLimit, maxLimit)
}
pub unsafe fn nvmlDeviceGetPowerManagementDefaultLimit(
&self,
device: nvmlDevice_t,
defaultLimit: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPowerManagementDefaultLimit
.as_ref()
.expect("Expected function, got error."))(device, defaultLimit)
}
pub unsafe fn nvmlDeviceGetPowerUsage(
&self,
device: nvmlDevice_t,
power: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPowerUsage
.as_ref()
.expect("Expected function, got error."))(device, power)
}
pub unsafe fn nvmlDeviceGetPowerMode(
&self,
device: nvmlDevice_t,
powerModeId: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPowerMode
.as_ref()
.expect("Expected function, got error."))(device, powerModeId)
}
pub unsafe fn nvmlDeviceGetSupportedPowerModes(
&self,
device: nvmlDevice_t,
supportedPowerModes: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetSupportedPowerModes
.as_ref()
.expect("Expected function, got error."))(device, supportedPowerModes)
}
pub unsafe fn nvmlDeviceSetPowerMode(
&self,
device: nvmlDevice_t,
powerModeId: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetPowerMode
.as_ref()
.expect("Expected function, got error."))(device, powerModeId)
}
pub unsafe fn nvmlDeviceGetTotalEnergyConsumption(
&self,
device: nvmlDevice_t,
energy: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetTotalEnergyConsumption
.as_ref()
.expect("Expected function, got error."))(device, energy)
}
pub unsafe fn nvmlDeviceGetEnforcedPowerLimit(
&self,
device: nvmlDevice_t,
limit: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetEnforcedPowerLimit
.as_ref()
.expect("Expected function, got error."))(device, limit)
}
pub unsafe fn nvmlDeviceGetGpuOperationMode(
&self,
device: nvmlDevice_t,
current: *mut nvmlGpuOperationMode_t,
pending: *mut nvmlGpuOperationMode_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGpuOperationMode
.as_ref()
.expect("Expected function, got error."))(device, current, pending)
}
pub unsafe fn nvmlDeviceGetMemoryInfo(
&self,
device: nvmlDevice_t,
memory: *mut nvmlMemory_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMemoryInfo
.as_ref()
.expect("Expected function, got error."))(device, memory)
}
pub unsafe fn nvmlDeviceGetMemoryInfo_v2(
&self,
device: nvmlDevice_t,
memory: *mut nvmlMemory_v2_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMemoryInfo_v2
.as_ref()
.expect("Expected function, got error."))(device, memory)
}
pub unsafe fn nvmlDeviceGetComputeMode(
&self,
device: nvmlDevice_t,
mode: *mut nvmlComputeMode_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetComputeMode
.as_ref()
.expect("Expected function, got error."))(device, mode)
}
pub unsafe fn nvmlDeviceGetCudaComputeCapability(
&self,
device: nvmlDevice_t,
major: *mut raw::c_int,
minor: *mut raw::c_int,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetCudaComputeCapability
.as_ref()
.expect("Expected function, got error."))(device, major, minor)
}
pub unsafe fn nvmlDeviceGetEccMode(
&self,
device: nvmlDevice_t,
current: *mut nvmlEnableState_t,
pending: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetEccMode
.as_ref()
.expect("Expected function, got error."))(device, current, pending)
}
pub unsafe fn nvmlDeviceGetDefaultEccMode(
&self,
device: nvmlDevice_t,
defaultMode: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetDefaultEccMode
.as_ref()
.expect("Expected function, got error."))(device, defaultMode)
}
pub unsafe fn nvmlDeviceGetBoardId(
&self,
device: nvmlDevice_t,
boardId: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetBoardId
.as_ref()
.expect("Expected function, got error."))(device, boardId)
}
pub unsafe fn nvmlDeviceGetMultiGpuBoard(
&self,
device: nvmlDevice_t,
multiGpuBool: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMultiGpuBoard
.as_ref()
.expect("Expected function, got error."))(device, multiGpuBool)
}
pub unsafe fn nvmlDeviceGetTotalEccErrors(
&self,
device: nvmlDevice_t,
errorType: nvmlMemoryErrorType_t,
counterType: nvmlEccCounterType_t,
eccCounts: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetTotalEccErrors
.as_ref()
.expect("Expected function, got error."))(
device, errorType, counterType, eccCounts
)
}
pub unsafe fn nvmlDeviceGetDetailedEccErrors(
&self,
device: nvmlDevice_t,
errorType: nvmlMemoryErrorType_t,
counterType: nvmlEccCounterType_t,
eccCounts: *mut nvmlEccErrorCounts_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetDetailedEccErrors
.as_ref()
.expect("Expected function, got error."))(
device, errorType, counterType, eccCounts
)
}
pub unsafe fn nvmlDeviceGetMemoryErrorCounter(
&self,
device: nvmlDevice_t,
errorType: nvmlMemoryErrorType_t,
counterType: nvmlEccCounterType_t,
locationType: nvmlMemoryLocation_t,
count: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMemoryErrorCounter
.as_ref()
.expect("Expected function, got error."))(
device,
errorType,
counterType,
locationType,
count,
)
}
pub unsafe fn nvmlDeviceGetUtilizationRates(
&self,
device: nvmlDevice_t,
utilization: *mut nvmlUtilization_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetUtilizationRates
.as_ref()
.expect("Expected function, got error."))(device, utilization)
}
pub unsafe fn nvmlDeviceGetEncoderUtilization(
&self,
device: nvmlDevice_t,
utilization: *mut raw::c_uint,
samplingPeriodUs: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetEncoderUtilization
.as_ref()
.expect("Expected function, got error."))(device, utilization, samplingPeriodUs)
}
pub unsafe fn nvmlDeviceGetEncoderCapacity(
&self,
device: nvmlDevice_t,
encoderQueryType: nvmlEncoderType_t,
encoderCapacity: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetEncoderCapacity
.as_ref()
.expect("Expected function, got error."))(
device, encoderQueryType, encoderCapacity
)
}
pub unsafe fn nvmlDeviceGetEncoderStats(
&self,
device: nvmlDevice_t,
sessionCount: *mut raw::c_uint,
averageFps: *mut raw::c_uint,
averageLatency: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetEncoderStats
.as_ref()
.expect("Expected function, got error."))(
device,
sessionCount,
averageFps,
averageLatency,
)
}
pub unsafe fn nvmlDeviceGetEncoderSessions(
&self,
device: nvmlDevice_t,
sessionCount: *mut raw::c_uint,
sessionInfos: *mut nvmlEncoderSessionInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetEncoderSessions
.as_ref()
.expect("Expected function, got error."))(device, sessionCount, sessionInfos)
}
pub unsafe fn nvmlDeviceGetDecoderUtilization(
&self,
device: nvmlDevice_t,
utilization: *mut raw::c_uint,
samplingPeriodUs: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetDecoderUtilization
.as_ref()
.expect("Expected function, got error."))(device, utilization, samplingPeriodUs)
}
pub unsafe fn nvmlDeviceGetFBCStats(
&self,
device: nvmlDevice_t,
fbcStats: *mut nvmlFBCStats_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetFBCStats
.as_ref()
.expect("Expected function, got error."))(device, fbcStats)
}
pub unsafe fn nvmlDeviceGetFBCSessions(
&self,
device: nvmlDevice_t,
sessionCount: *mut raw::c_uint,
sessionInfo: *mut nvmlFBCSessionInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetFBCSessions
.as_ref()
.expect("Expected function, got error."))(device, sessionCount, sessionInfo)
}
pub unsafe fn nvmlDeviceGetDriverModel(
&self,
device: nvmlDevice_t,
current: *mut nvmlDriverModel_t,
pending: *mut nvmlDriverModel_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetDriverModel
.as_ref()
.expect("Expected function, got error."))(device, current, pending)
}
pub unsafe fn nvmlDeviceGetVbiosVersion(
&self,
device: nvmlDevice_t,
version: *mut raw::c_char,
length: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetVbiosVersion
.as_ref()
.expect("Expected function, got error."))(device, version, length)
}
pub unsafe fn nvmlDeviceGetBridgeChipInfo(
&self,
device: nvmlDevice_t,
bridgeHierarchy: *mut nvmlBridgeChipHierarchy_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetBridgeChipInfo
.as_ref()
.expect("Expected function, got error."))(device, bridgeHierarchy)
}
pub unsafe fn nvmlDeviceGetComputeRunningProcesses_v3(
&self,
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetComputeRunningProcesses_v3
.as_ref()
.expect("Expected function, got error."))(device, infoCount, infos)
}
pub unsafe fn nvmlDeviceGetGraphicsRunningProcesses_v3(
&self,
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGraphicsRunningProcesses_v3
.as_ref()
.expect("Expected function, got error."))(device, infoCount, infos)
}
pub unsafe fn nvmlDeviceGetMPSComputeRunningProcesses_v3(
&self,
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMPSComputeRunningProcesses_v3
.as_ref()
.expect("Expected function, got error."))(device, infoCount, infos)
}
pub unsafe fn nvmlDeviceOnSameBoard(
&self,
device1: nvmlDevice_t,
device2: nvmlDevice_t,
onSameBoard: *mut raw::c_int,
) -> nvmlReturn_t {
(self
.nvmlDeviceOnSameBoard
.as_ref()
.expect("Expected function, got error."))(device1, device2, onSameBoard)
}
pub unsafe fn nvmlDeviceGetAPIRestriction(
&self,
device: nvmlDevice_t,
apiType: nvmlRestrictedAPI_t,
isRestricted: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetAPIRestriction
.as_ref()
.expect("Expected function, got error."))(device, apiType, isRestricted)
}
pub unsafe fn nvmlDeviceGetSamples(
&self,
device: nvmlDevice_t,
type_: nvmlSamplingType_t,
lastSeenTimeStamp: raw::c_ulonglong,
sampleValType: *mut nvmlValueType_t,
sampleCount: *mut raw::c_uint,
samples: *mut nvmlSample_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetSamples
.as_ref()
.expect("Expected function, got error."))(
device,
type_,
lastSeenTimeStamp,
sampleValType,
sampleCount,
samples,
)
}
pub unsafe fn nvmlDeviceGetBAR1MemoryInfo(
&self,
device: nvmlDevice_t,
bar1Memory: *mut nvmlBAR1Memory_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetBAR1MemoryInfo
.as_ref()
.expect("Expected function, got error."))(device, bar1Memory)
}
pub unsafe fn nvmlDeviceGetViolationStatus(
&self,
device: nvmlDevice_t,
perfPolicyType: nvmlPerfPolicyType_t,
violTime: *mut nvmlViolationTime_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetViolationStatus
.as_ref()
.expect("Expected function, got error."))(device, perfPolicyType, violTime)
}
pub unsafe fn nvmlDeviceGetIrqNum(
&self,
device: nvmlDevice_t,
irqNum: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetIrqNum
.as_ref()
.expect("Expected function, got error."))(device, irqNum)
}
pub unsafe fn nvmlDeviceGetNumGpuCores(
&self,
device: nvmlDevice_t,
numCores: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetNumGpuCores
.as_ref()
.expect("Expected function, got error."))(device, numCores)
}
pub unsafe fn nvmlDeviceGetPowerSource(
&self,
device: nvmlDevice_t,
powerSource: *mut nvmlPowerSource_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPowerSource
.as_ref()
.expect("Expected function, got error."))(device, powerSource)
}
pub unsafe fn nvmlDeviceGetMemoryBusWidth(
&self,
device: nvmlDevice_t,
busWidth: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMemoryBusWidth
.as_ref()
.expect("Expected function, got error."))(device, busWidth)
}
pub unsafe fn nvmlDeviceGetPcieLinkMaxSpeed(
&self,
device: nvmlDevice_t,
maxSpeed: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPcieLinkMaxSpeed
.as_ref()
.expect("Expected function, got error."))(device, maxSpeed)
}
pub unsafe fn nvmlDeviceGetPcieSpeed(
&self,
device: nvmlDevice_t,
pcieSpeed: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPcieSpeed
.as_ref()
.expect("Expected function, got error."))(device, pcieSpeed)
}
pub unsafe fn nvmlDeviceGetAdaptiveClockInfoStatus(
&self,
device: nvmlDevice_t,
adaptiveClockStatus: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetAdaptiveClockInfoStatus
.as_ref()
.expect("Expected function, got error."))(device, adaptiveClockStatus)
}
pub unsafe fn nvmlDeviceGetAccountingMode(
&self,
device: nvmlDevice_t,
mode: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetAccountingMode
.as_ref()
.expect("Expected function, got error."))(device, mode)
}
pub unsafe fn nvmlDeviceGetAccountingStats(
&self,
device: nvmlDevice_t,
pid: raw::c_uint,
stats: *mut nvmlAccountingStats_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetAccountingStats
.as_ref()
.expect("Expected function, got error."))(device, pid, stats)
}
pub unsafe fn nvmlDeviceGetAccountingPids(
&self,
device: nvmlDevice_t,
count: *mut raw::c_uint,
pids: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetAccountingPids
.as_ref()
.expect("Expected function, got error."))(device, count, pids)
}
pub unsafe fn nvmlDeviceGetAccountingBufferSize(
&self,
device: nvmlDevice_t,
bufferSize: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetAccountingBufferSize
.as_ref()
.expect("Expected function, got error."))(device, bufferSize)
}
pub unsafe fn nvmlDeviceGetRetiredPages(
&self,
device: nvmlDevice_t,
cause: nvmlPageRetirementCause_t,
pageCount: *mut raw::c_uint,
addresses: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetRetiredPages
.as_ref()
.expect("Expected function, got error."))(device, cause, pageCount, addresses)
}
pub unsafe fn nvmlDeviceGetRetiredPages_v2(
&self,
device: nvmlDevice_t,
cause: nvmlPageRetirementCause_t,
pageCount: *mut raw::c_uint,
addresses: *mut raw::c_ulonglong,
timestamps: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetRetiredPages_v2
.as_ref()
.expect("Expected function, got error."))(
device, cause, pageCount, addresses, timestamps,
)
}
pub unsafe fn nvmlDeviceGetRetiredPagesPendingStatus(
&self,
device: nvmlDevice_t,
isPending: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetRetiredPagesPendingStatus
.as_ref()
.expect("Expected function, got error."))(device, isPending)
}
pub unsafe fn nvmlDeviceGetRemappedRows(
&self,
device: nvmlDevice_t,
corrRows: *mut raw::c_uint,
uncRows: *mut raw::c_uint,
isPending: *mut raw::c_uint,
failureOccurred: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetRemappedRows
.as_ref()
.expect("Expected function, got error."))(
device,
corrRows,
uncRows,
isPending,
failureOccurred,
)
}
pub unsafe fn nvmlDeviceGetRowRemapperHistogram(
&self,
device: nvmlDevice_t,
values: *mut nvmlRowRemapperHistogramValues_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetRowRemapperHistogram
.as_ref()
.expect("Expected function, got error."))(device, values)
}
pub unsafe fn nvmlDeviceGetArchitecture(
&self,
device: nvmlDevice_t,
arch: *mut nvmlDeviceArchitecture_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetArchitecture
.as_ref()
.expect("Expected function, got error."))(device, arch)
}
pub unsafe fn nvmlUnitSetLedState(
&self,
unit: nvmlUnit_t,
color: nvmlLedColor_t,
) -> nvmlReturn_t {
(self
.nvmlUnitSetLedState
.as_ref()
.expect("Expected function, got error."))(unit, color)
}
pub unsafe fn nvmlDeviceSetPersistenceMode(
&self,
device: nvmlDevice_t,
mode: nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetPersistenceMode
.as_ref()
.expect("Expected function, got error."))(device, mode)
}
pub unsafe fn nvmlDeviceSetComputeMode(
&self,
device: nvmlDevice_t,
mode: nvmlComputeMode_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetComputeMode
.as_ref()
.expect("Expected function, got error."))(device, mode)
}
pub unsafe fn nvmlDeviceSetEccMode(
&self,
device: nvmlDevice_t,
ecc: nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetEccMode
.as_ref()
.expect("Expected function, got error."))(device, ecc)
}
pub unsafe fn nvmlDeviceClearEccErrorCounts(
&self,
device: nvmlDevice_t,
counterType: nvmlEccCounterType_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceClearEccErrorCounts
.as_ref()
.expect("Expected function, got error."))(device, counterType)
}
pub unsafe fn nvmlDeviceSetDriverModel(
&self,
device: nvmlDevice_t,
driverModel: nvmlDriverModel_t,
flags: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetDriverModel
.as_ref()
.expect("Expected function, got error."))(device, driverModel, flags)
}
pub unsafe fn nvmlDeviceSetGpuLockedClocks(
&self,
device: nvmlDevice_t,
minGpuClockMHz: raw::c_uint,
maxGpuClockMHz: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetGpuLockedClocks
.as_ref()
.expect("Expected function, got error."))(device, minGpuClockMHz, maxGpuClockMHz)
}
pub unsafe fn nvmlDeviceResetGpuLockedClocks(&self, device: nvmlDevice_t) -> nvmlReturn_t {
(self
.nvmlDeviceResetGpuLockedClocks
.as_ref()
.expect("Expected function, got error."))(device)
}
pub unsafe fn nvmlDeviceSetMemoryLockedClocks(
&self,
device: nvmlDevice_t,
minMemClockMHz: raw::c_uint,
maxMemClockMHz: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetMemoryLockedClocks
.as_ref()
.expect("Expected function, got error."))(device, minMemClockMHz, maxMemClockMHz)
}
pub unsafe fn nvmlDeviceResetMemoryLockedClocks(&self, device: nvmlDevice_t) -> nvmlReturn_t {
(self
.nvmlDeviceResetMemoryLockedClocks
.as_ref()
.expect("Expected function, got error."))(device)
}
pub unsafe fn nvmlDeviceSetApplicationsClocks(
&self,
device: nvmlDevice_t,
memClockMHz: raw::c_uint,
graphicsClockMHz: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetApplicationsClocks
.as_ref()
.expect("Expected function, got error."))(device, memClockMHz, graphicsClockMHz)
}
pub unsafe fn nvmlDeviceGetClkMonStatus(
&self,
device: nvmlDevice_t,
status: *mut nvmlClkMonStatus_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetClkMonStatus
.as_ref()
.expect("Expected function, got error."))(device, status)
}
pub unsafe fn nvmlDeviceSetPowerManagementLimit(
&self,
device: nvmlDevice_t,
limit: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetPowerManagementLimit
.as_ref()
.expect("Expected function, got error."))(device, limit)
}
pub unsafe fn nvmlDeviceSetGpuOperationMode(
&self,
device: nvmlDevice_t,
mode: nvmlGpuOperationMode_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetGpuOperationMode
.as_ref()
.expect("Expected function, got error."))(device, mode)
}
pub unsafe fn nvmlDeviceSetAPIRestriction(
&self,
device: nvmlDevice_t,
apiType: nvmlRestrictedAPI_t,
isRestricted: nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetAPIRestriction
.as_ref()
.expect("Expected function, got error."))(device, apiType, isRestricted)
}
pub unsafe fn nvmlDeviceSetAccountingMode(
&self,
device: nvmlDevice_t,
mode: nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetAccountingMode
.as_ref()
.expect("Expected function, got error."))(device, mode)
}
pub unsafe fn nvmlDeviceClearAccountingPids(&self, device: nvmlDevice_t) -> nvmlReturn_t {
(self
.nvmlDeviceClearAccountingPids
.as_ref()
.expect("Expected function, got error."))(device)
}
pub unsafe fn nvmlDeviceGetNvLinkState(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
isActive: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetNvLinkState
.as_ref()
.expect("Expected function, got error."))(device, link, isActive)
}
pub unsafe fn nvmlDeviceGetNvLinkVersion(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
version: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetNvLinkVersion
.as_ref()
.expect("Expected function, got error."))(device, link, version)
}
pub unsafe fn nvmlDeviceGetNvLinkCapability(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
capability: nvmlNvLinkCapability_t,
capResult: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetNvLinkCapability
.as_ref()
.expect("Expected function, got error."))(device, link, capability, capResult)
}
pub unsafe fn nvmlDeviceGetNvLinkRemotePciInfo_v2(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
pci: *mut nvmlPciInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetNvLinkRemotePciInfo_v2
.as_ref()
.expect("Expected function, got error."))(device, link, pci)
}
pub unsafe fn nvmlDeviceGetNvLinkErrorCounter(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
counter: nvmlNvLinkErrorCounter_t,
counterValue: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetNvLinkErrorCounter
.as_ref()
.expect("Expected function, got error."))(device, link, counter, counterValue)
}
pub unsafe fn nvmlDeviceResetNvLinkErrorCounters(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceResetNvLinkErrorCounters
.as_ref()
.expect("Expected function, got error."))(device, link)
}
pub unsafe fn nvmlDeviceSetNvLinkUtilizationControl(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
counter: raw::c_uint,
control: *mut nvmlNvLinkUtilizationControl_t,
reset: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetNvLinkUtilizationControl
.as_ref()
.expect("Expected function, got error."))(device, link, counter, control, reset)
}
pub unsafe fn nvmlDeviceGetNvLinkUtilizationControl(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
counter: raw::c_uint,
control: *mut nvmlNvLinkUtilizationControl_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetNvLinkUtilizationControl
.as_ref()
.expect("Expected function, got error."))(device, link, counter, control)
}
pub unsafe fn nvmlDeviceGetNvLinkUtilizationCounter(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
counter: raw::c_uint,
rxcounter: *mut raw::c_ulonglong,
txcounter: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetNvLinkUtilizationCounter
.as_ref()
.expect("Expected function, got error."))(
device, link, counter, rxcounter, txcounter
)
}
pub unsafe fn nvmlDeviceFreezeNvLinkUtilizationCounter(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
counter: raw::c_uint,
freeze: nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceFreezeNvLinkUtilizationCounter
.as_ref()
.expect("Expected function, got error."))(device, link, counter, freeze)
}
pub unsafe fn nvmlDeviceResetNvLinkUtilizationCounter(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
counter: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceResetNvLinkUtilizationCounter
.as_ref()
.expect("Expected function, got error."))(device, link, counter)
}
pub unsafe fn nvmlDeviceGetNvLinkRemoteDeviceType(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
pNvLinkDeviceType: *mut nvmlIntNvLinkDeviceType_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetNvLinkRemoteDeviceType
.as_ref()
.expect("Expected function, got error."))(device, link, pNvLinkDeviceType)
}
pub unsafe fn nvmlEventSetCreate(&self, set: *mut nvmlEventSet_t) -> nvmlReturn_t {
(self
.nvmlEventSetCreate
.as_ref()
.expect("Expected function, got error."))(set)
}
pub unsafe fn nvmlDeviceRegisterEvents(
&self,
device: nvmlDevice_t,
eventTypes: raw::c_ulonglong,
set: nvmlEventSet_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceRegisterEvents
.as_ref()
.expect("Expected function, got error."))(device, eventTypes, set)
}
pub unsafe fn nvmlDeviceGetSupportedEventTypes(
&self,
device: nvmlDevice_t,
eventTypes: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetSupportedEventTypes
.as_ref()
.expect("Expected function, got error."))(device, eventTypes)
}
pub unsafe fn nvmlEventSetWait_v2(
&self,
set: nvmlEventSet_t,
data: *mut nvmlEventData_t,
timeoutms: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlEventSetWait_v2
.as_ref()
.expect("Expected function, got error."))(set, data, timeoutms)
}
pub unsafe fn nvmlEventSetFree(&self, set: nvmlEventSet_t) -> nvmlReturn_t {
(self
.nvmlEventSetFree
.as_ref()
.expect("Expected function, got error."))(set)
}
pub unsafe fn nvmlDeviceModifyDrainState(
&self,
pciInfo: *mut nvmlPciInfo_t,
newState: nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceModifyDrainState
.as_ref()
.expect("Expected function, got error."))(pciInfo, newState)
}
pub unsafe fn nvmlDeviceQueryDrainState(
&self,
pciInfo: *mut nvmlPciInfo_t,
currentState: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceQueryDrainState
.as_ref()
.expect("Expected function, got error."))(pciInfo, currentState)
}
pub unsafe fn nvmlDeviceRemoveGpu_v2(
&self,
pciInfo: *mut nvmlPciInfo_t,
gpuState: nvmlDetachGpuState_t,
linkState: nvmlPcieLinkState_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceRemoveGpu_v2
.as_ref()
.expect("Expected function, got error."))(pciInfo, gpuState, linkState)
}
pub unsafe fn nvmlDeviceDiscoverGpus(&self, pciInfo: *mut nvmlPciInfo_t) -> nvmlReturn_t {
(self
.nvmlDeviceDiscoverGpus
.as_ref()
.expect("Expected function, got error."))(pciInfo)
}
pub unsafe fn nvmlDeviceGetFieldValues(
&self,
device: nvmlDevice_t,
valuesCount: raw::c_int,
values: *mut nvmlFieldValue_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetFieldValues
.as_ref()
.expect("Expected function, got error."))(device, valuesCount, values)
}
pub unsafe fn nvmlDeviceGetVirtualizationMode(
&self,
device: nvmlDevice_t,
pVirtualMode: *mut nvmlGpuVirtualizationMode_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetVirtualizationMode
.as_ref()
.expect("Expected function, got error."))(device, pVirtualMode)
}
pub unsafe fn nvmlDeviceGetHostVgpuMode(
&self,
device: nvmlDevice_t,
pHostVgpuMode: *mut nvmlHostVgpuMode_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetHostVgpuMode
.as_ref()
.expect("Expected function, got error."))(device, pHostVgpuMode)
}
pub unsafe fn nvmlDeviceSetVirtualizationMode(
&self,
device: nvmlDevice_t,
virtualMode: nvmlGpuVirtualizationMode_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetVirtualizationMode
.as_ref()
.expect("Expected function, got error."))(device, virtualMode)
}
pub unsafe fn nvmlDeviceGetGridLicensableFeatures_v4(
&self,
device: nvmlDevice_t,
pGridLicensableFeatures: *mut nvmlGridLicensableFeatures_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGridLicensableFeatures_v4
.as_ref()
.expect("Expected function, got error."))(device, pGridLicensableFeatures)
}
pub unsafe fn nvmlDeviceGetProcessUtilization(
&self,
device: nvmlDevice_t,
utilization: *mut nvmlProcessUtilizationSample_t,
processSamplesCount: *mut raw::c_uint,
lastSeenTimeStamp: raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetProcessUtilization
.as_ref()
.expect("Expected function, got error."))(
device,
utilization,
processSamplesCount,
lastSeenTimeStamp,
)
}
pub unsafe fn nvmlDeviceGetGspFirmwareVersion(
&self,
device: nvmlDevice_t,
version: *mut raw::c_char,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGspFirmwareVersion
.as_ref()
.expect("Expected function, got error."))(device, version)
}
pub unsafe fn nvmlDeviceGetGspFirmwareMode(
&self,
device: nvmlDevice_t,
isEnabled: *mut raw::c_uint,
defaultMode: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGspFirmwareMode
.as_ref()
.expect("Expected function, got error."))(device, isEnabled, defaultMode)
}
pub unsafe fn nvmlDeviceGetSupportedVgpus(
&self,
device: nvmlDevice_t,
vgpuCount: *mut raw::c_uint,
vgpuTypeIds: *mut nvmlVgpuTypeId_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetSupportedVgpus
.as_ref()
.expect("Expected function, got error."))(device, vgpuCount, vgpuTypeIds)
}
pub unsafe fn nvmlDeviceGetCreatableVgpus(
&self,
device: nvmlDevice_t,
vgpuCount: *mut raw::c_uint,
vgpuTypeIds: *mut nvmlVgpuTypeId_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetCreatableVgpus
.as_ref()
.expect("Expected function, got error."))(device, vgpuCount, vgpuTypeIds)
}
pub unsafe fn nvmlVgpuTypeGetClass(
&self,
vgpuTypeId: nvmlVgpuTypeId_t,
vgpuTypeClass: *mut raw::c_char,
size: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetClass
.as_ref()
.expect("Expected function, got error."))(vgpuTypeId, vgpuTypeClass, size)
}
pub unsafe fn nvmlVgpuTypeGetName(
&self,
vgpuTypeId: nvmlVgpuTypeId_t,
vgpuTypeName: *mut raw::c_char,
size: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetName
.as_ref()
.expect("Expected function, got error."))(vgpuTypeId, vgpuTypeName, size)
}
pub unsafe fn nvmlVgpuTypeGetGpuInstanceProfileId(
&self,
vgpuTypeId: nvmlVgpuTypeId_t,
gpuInstanceProfileId: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetGpuInstanceProfileId
.as_ref()
.expect("Expected function, got error."))(vgpuTypeId, gpuInstanceProfileId)
}
pub unsafe fn nvmlVgpuTypeGetDeviceID(
&self,
vgpuTypeId: nvmlVgpuTypeId_t,
deviceID: *mut raw::c_ulonglong,
subsystemID: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetDeviceID
.as_ref()
.expect("Expected function, got error."))(vgpuTypeId, deviceID, subsystemID)
}
pub unsafe fn nvmlVgpuTypeGetFramebufferSize(
&self,
vgpuTypeId: nvmlVgpuTypeId_t,
fbSize: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetFramebufferSize
.as_ref()
.expect("Expected function, got error."))(vgpuTypeId, fbSize)
}
pub unsafe fn nvmlVgpuTypeGetNumDisplayHeads(
&self,
vgpuTypeId: nvmlVgpuTypeId_t,
numDisplayHeads: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetNumDisplayHeads
.as_ref()
.expect("Expected function, got error."))(vgpuTypeId, numDisplayHeads)
}
pub unsafe fn nvmlVgpuTypeGetResolution(
&self,
vgpuTypeId: nvmlVgpuTypeId_t,
displayIndex: raw::c_uint,
xdim: *mut raw::c_uint,
ydim: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetResolution
.as_ref()
.expect("Expected function, got error."))(vgpuTypeId, displayIndex, xdim, ydim)
}
pub unsafe fn nvmlVgpuTypeGetLicense(
&self,
vgpuTypeId: nvmlVgpuTypeId_t,
vgpuTypeLicenseString: *mut raw::c_char,
size: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetLicense
.as_ref()
.expect("Expected function, got error."))(
vgpuTypeId, vgpuTypeLicenseString, size
)
}
pub unsafe fn nvmlVgpuTypeGetFrameRateLimit(
&self,
vgpuTypeId: nvmlVgpuTypeId_t,
frameRateLimit: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetFrameRateLimit
.as_ref()
.expect("Expected function, got error."))(vgpuTypeId, frameRateLimit)
}
pub unsafe fn nvmlVgpuTypeGetMaxInstances(
&self,
device: nvmlDevice_t,
vgpuTypeId: nvmlVgpuTypeId_t,
vgpuInstanceCount: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetMaxInstances
.as_ref()
.expect("Expected function, got error."))(device, vgpuTypeId, vgpuInstanceCount)
}
pub unsafe fn nvmlVgpuTypeGetMaxInstancesPerVm(
&self,
vgpuTypeId: nvmlVgpuTypeId_t,
vgpuInstanceCountPerVm: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetMaxInstancesPerVm
.as_ref()
.expect("Expected function, got error."))(vgpuTypeId, vgpuInstanceCountPerVm)
}
pub unsafe fn nvmlDeviceGetActiveVgpus(
&self,
device: nvmlDevice_t,
vgpuCount: *mut raw::c_uint,
vgpuInstances: *mut nvmlVgpuInstance_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetActiveVgpus
.as_ref()
.expect("Expected function, got error."))(device, vgpuCount, vgpuInstances)
}
pub unsafe fn nvmlVgpuInstanceGetVmID(
&self,
vgpuInstance: nvmlVgpuInstance_t,
vmId: *mut raw::c_char,
size: raw::c_uint,
vmIdType: *mut nvmlVgpuVmIdType_t,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetVmID
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, vmId, size, vmIdType)
}
pub unsafe fn nvmlVgpuInstanceGetUUID(
&self,
vgpuInstance: nvmlVgpuInstance_t,
uuid: *mut raw::c_char,
size: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetUUID
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, uuid, size)
}
pub unsafe fn nvmlVgpuInstanceGetVmDriverVersion(
&self,
vgpuInstance: nvmlVgpuInstance_t,
version: *mut raw::c_char,
length: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetVmDriverVersion
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, version, length)
}
pub unsafe fn nvmlVgpuInstanceGetFbUsage(
&self,
vgpuInstance: nvmlVgpuInstance_t,
fbUsage: *mut raw::c_ulonglong,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetFbUsage
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, fbUsage)
}
pub unsafe fn nvmlVgpuInstanceGetLicenseStatus(
&self,
vgpuInstance: nvmlVgpuInstance_t,
licensed: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetLicenseStatus
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, licensed)
}
pub unsafe fn nvmlVgpuInstanceGetType(
&self,
vgpuInstance: nvmlVgpuInstance_t,
vgpuTypeId: *mut nvmlVgpuTypeId_t,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetType
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, vgpuTypeId)
}
pub unsafe fn nvmlVgpuInstanceGetFrameRateLimit(
&self,
vgpuInstance: nvmlVgpuInstance_t,
frameRateLimit: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetFrameRateLimit
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, frameRateLimit)
}
pub unsafe fn nvmlVgpuInstanceGetEccMode(
&self,
vgpuInstance: nvmlVgpuInstance_t,
eccMode: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetEccMode
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, eccMode)
}
pub unsafe fn nvmlVgpuInstanceGetEncoderCapacity(
&self,
vgpuInstance: nvmlVgpuInstance_t,
encoderCapacity: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetEncoderCapacity
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, encoderCapacity)
}
pub unsafe fn nvmlVgpuInstanceSetEncoderCapacity(
&self,
vgpuInstance: nvmlVgpuInstance_t,
encoderCapacity: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceSetEncoderCapacity
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, encoderCapacity)
}
pub unsafe fn nvmlVgpuInstanceGetEncoderStats(
&self,
vgpuInstance: nvmlVgpuInstance_t,
sessionCount: *mut raw::c_uint,
averageFps: *mut raw::c_uint,
averageLatency: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetEncoderStats
.as_ref()
.expect("Expected function, got error."))(
vgpuInstance,
sessionCount,
averageFps,
averageLatency,
)
}
pub unsafe fn nvmlVgpuInstanceGetEncoderSessions(
&self,
vgpuInstance: nvmlVgpuInstance_t,
sessionCount: *mut raw::c_uint,
sessionInfo: *mut nvmlEncoderSessionInfo_t,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetEncoderSessions
.as_ref()
.expect("Expected function, got error."))(
vgpuInstance, sessionCount, sessionInfo
)
}
pub unsafe fn nvmlVgpuInstanceGetFBCStats(
&self,
vgpuInstance: nvmlVgpuInstance_t,
fbcStats: *mut nvmlFBCStats_t,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetFBCStats
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, fbcStats)
}
pub unsafe fn nvmlVgpuInstanceGetFBCSessions(
&self,
vgpuInstance: nvmlVgpuInstance_t,
sessionCount: *mut raw::c_uint,
sessionInfo: *mut nvmlFBCSessionInfo_t,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetFBCSessions
.as_ref()
.expect("Expected function, got error."))(
vgpuInstance, sessionCount, sessionInfo
)
}
pub unsafe fn nvmlVgpuInstanceGetGpuInstanceId(
&self,
vgpuInstance: nvmlVgpuInstance_t,
gpuInstanceId: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetGpuInstanceId
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, gpuInstanceId)
}
pub unsafe fn nvmlVgpuInstanceGetGpuPciId(
&self,
vgpuInstance: nvmlVgpuInstance_t,
vgpuPciId: *mut raw::c_char,
length: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetGpuPciId
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, vgpuPciId, length)
}
pub unsafe fn nvmlVgpuTypeGetCapabilities(
&self,
vgpuTypeId: nvmlVgpuTypeId_t,
capability: nvmlVgpuCapability_t,
capResult: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuTypeGetCapabilities
.as_ref()
.expect("Expected function, got error."))(vgpuTypeId, capability, capResult)
}
pub unsafe fn nvmlVgpuInstanceGetMetadata(
&self,
vgpuInstance: nvmlVgpuInstance_t,
vgpuMetadata: *mut nvmlVgpuMetadata_t,
bufferSize: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetMetadata
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, vgpuMetadata, bufferSize)
}
pub unsafe fn nvmlDeviceGetVgpuMetadata(
&self,
device: nvmlDevice_t,
pgpuMetadata: *mut nvmlVgpuPgpuMetadata_t,
bufferSize: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetVgpuMetadata
.as_ref()
.expect("Expected function, got error."))(device, pgpuMetadata, bufferSize)
}
pub unsafe fn nvmlGetVgpuCompatibility(
&self,
vgpuMetadata: *mut nvmlVgpuMetadata_t,
pgpuMetadata: *mut nvmlVgpuPgpuMetadata_t,
compatibilityInfo: *mut nvmlVgpuPgpuCompatibility_t,
) -> nvmlReturn_t {
(self
.nvmlGetVgpuCompatibility
.as_ref()
.expect("Expected function, got error."))(
vgpuMetadata, pgpuMetadata, compatibilityInfo
)
}
pub unsafe fn nvmlDeviceGetPgpuMetadataString(
&self,
device: nvmlDevice_t,
pgpuMetadata: *mut raw::c_char,
bufferSize: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPgpuMetadataString
.as_ref()
.expect("Expected function, got error."))(device, pgpuMetadata, bufferSize)
}
pub unsafe fn nvmlGetVgpuVersion(
&self,
supported: *mut nvmlVgpuVersion_t,
current: *mut nvmlVgpuVersion_t,
) -> nvmlReturn_t {
(self
.nvmlGetVgpuVersion
.as_ref()
.expect("Expected function, got error."))(supported, current)
}
pub unsafe fn nvmlSetVgpuVersion(&self, vgpuVersion: *mut nvmlVgpuVersion_t) -> nvmlReturn_t {
(self
.nvmlSetVgpuVersion
.as_ref()
.expect("Expected function, got error."))(vgpuVersion)
}
pub unsafe fn nvmlDeviceGetVgpuUtilization(
&self,
device: nvmlDevice_t,
lastSeenTimeStamp: raw::c_ulonglong,
sampleValType: *mut nvmlValueType_t,
vgpuInstanceSamplesCount: *mut raw::c_uint,
utilizationSamples: *mut nvmlVgpuInstanceUtilizationSample_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetVgpuUtilization
.as_ref()
.expect("Expected function, got error."))(
device,
lastSeenTimeStamp,
sampleValType,
vgpuInstanceSamplesCount,
utilizationSamples,
)
}
pub unsafe fn nvmlDeviceGetVgpuProcessUtilization(
&self,
device: nvmlDevice_t,
lastSeenTimeStamp: raw::c_ulonglong,
vgpuProcessSamplesCount: *mut raw::c_uint,
utilizationSamples: *mut nvmlVgpuProcessUtilizationSample_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetVgpuProcessUtilization
.as_ref()
.expect("Expected function, got error."))(
device,
lastSeenTimeStamp,
vgpuProcessSamplesCount,
utilizationSamples,
)
}
pub unsafe fn nvmlVgpuInstanceGetAccountingMode(
&self,
vgpuInstance: nvmlVgpuInstance_t,
mode: *mut nvmlEnableState_t,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetAccountingMode
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, mode)
}
pub unsafe fn nvmlVgpuInstanceGetAccountingPids(
&self,
vgpuInstance: nvmlVgpuInstance_t,
count: *mut raw::c_uint,
pids: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetAccountingPids
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, count, pids)
}
pub unsafe fn nvmlVgpuInstanceGetAccountingStats(
&self,
vgpuInstance: nvmlVgpuInstance_t,
pid: raw::c_uint,
stats: *mut nvmlAccountingStats_t,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetAccountingStats
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, pid, stats)
}
pub unsafe fn nvmlVgpuInstanceClearAccountingPids(
&self,
vgpuInstance: nvmlVgpuInstance_t,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceClearAccountingPids
.as_ref()
.expect("Expected function, got error."))(vgpuInstance)
}
pub unsafe fn nvmlVgpuInstanceGetLicenseInfo_v2(
&self,
vgpuInstance: nvmlVgpuInstance_t,
licenseInfo: *mut nvmlVgpuLicenseInfo_t,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetLicenseInfo_v2
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, licenseInfo)
}
pub unsafe fn nvmlGetExcludedDeviceCount(&self, deviceCount: *mut raw::c_uint) -> nvmlReturn_t {
(self
.nvmlGetExcludedDeviceCount
.as_ref()
.expect("Expected function, got error."))(deviceCount)
}
pub unsafe fn nvmlGetExcludedDeviceInfoByIndex(
&self,
index: raw::c_uint,
info: *mut nvmlExcludedDeviceInfo_t,
) -> nvmlReturn_t {
(self
.nvmlGetExcludedDeviceInfoByIndex
.as_ref()
.expect("Expected function, got error."))(index, info)
}
pub unsafe fn nvmlDeviceSetMigMode(
&self,
device: nvmlDevice_t,
mode: raw::c_uint,
activationStatus: *mut nvmlReturn_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetMigMode
.as_ref()
.expect("Expected function, got error."))(device, mode, activationStatus)
}
pub unsafe fn nvmlDeviceGetMigMode(
&self,
device: nvmlDevice_t,
currentMode: *mut raw::c_uint,
pendingMode: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMigMode
.as_ref()
.expect("Expected function, got error."))(device, currentMode, pendingMode)
}
pub unsafe fn nvmlDeviceGetGpuInstanceProfileInfo(
&self,
device: nvmlDevice_t,
profile: raw::c_uint,
info: *mut nvmlGpuInstanceProfileInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGpuInstanceProfileInfo
.as_ref()
.expect("Expected function, got error."))(device, profile, info)
}
pub unsafe fn nvmlDeviceGetGpuInstanceProfileInfoV(
&self,
device: nvmlDevice_t,
profile: raw::c_uint,
info: *mut nvmlGpuInstanceProfileInfo_v2_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGpuInstanceProfileInfoV
.as_ref()
.expect("Expected function, got error."))(device, profile, info)
}
pub unsafe fn nvmlDeviceGetGpuInstancePossiblePlacements_v2(
&self,
device: nvmlDevice_t,
profileId: raw::c_uint,
placements: *mut nvmlGpuInstancePlacement_t,
count: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGpuInstancePossiblePlacements_v2
.as_ref()
.expect("Expected function, got error."))(device, profileId, placements, count)
}
pub unsafe fn nvmlDeviceGetGpuInstanceRemainingCapacity(
&self,
device: nvmlDevice_t,
profileId: raw::c_uint,
count: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGpuInstanceRemainingCapacity
.as_ref()
.expect("Expected function, got error."))(device, profileId, count)
}
pub unsafe fn nvmlDeviceCreateGpuInstance(
&self,
device: nvmlDevice_t,
profileId: raw::c_uint,
gpuInstance: *mut nvmlGpuInstance_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceCreateGpuInstance
.as_ref()
.expect("Expected function, got error."))(device, profileId, gpuInstance)
}
pub unsafe fn nvmlDeviceCreateGpuInstanceWithPlacement(
&self,
device: nvmlDevice_t,
profileId: raw::c_uint,
placement: *const nvmlGpuInstancePlacement_t,
gpuInstance: *mut nvmlGpuInstance_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceCreateGpuInstanceWithPlacement
.as_ref()
.expect("Expected function, got error."))(
device, profileId, placement, gpuInstance
)
}
pub unsafe fn nvmlGpuInstanceDestroy(&self, gpuInstance: nvmlGpuInstance_t) -> nvmlReturn_t {
(self
.nvmlGpuInstanceDestroy
.as_ref()
.expect("Expected function, got error."))(gpuInstance)
}
pub unsafe fn nvmlDeviceGetGpuInstances(
&self,
device: nvmlDevice_t,
profileId: raw::c_uint,
gpuInstances: *mut nvmlGpuInstance_t,
count: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGpuInstances
.as_ref()
.expect("Expected function, got error."))(device, profileId, gpuInstances, count)
}
pub unsafe fn nvmlDeviceGetGpuInstanceById(
&self,
device: nvmlDevice_t,
id: raw::c_uint,
gpuInstance: *mut nvmlGpuInstance_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGpuInstanceById
.as_ref()
.expect("Expected function, got error."))(device, id, gpuInstance)
}
pub unsafe fn nvmlGpuInstanceGetInfo(
&self,
gpuInstance: nvmlGpuInstance_t,
info: *mut nvmlGpuInstanceInfo_t,
) -> nvmlReturn_t {
(self
.nvmlGpuInstanceGetInfo
.as_ref()
.expect("Expected function, got error."))(gpuInstance, info)
}
pub unsafe fn nvmlGpuInstanceGetComputeInstanceProfileInfo(
&self,
gpuInstance: nvmlGpuInstance_t,
profile: raw::c_uint,
engProfile: raw::c_uint,
info: *mut nvmlComputeInstanceProfileInfo_t,
) -> nvmlReturn_t {
(self
.nvmlGpuInstanceGetComputeInstanceProfileInfo
.as_ref()
.expect("Expected function, got error."))(gpuInstance, profile, engProfile, info)
}
pub unsafe fn nvmlGpuInstanceGetComputeInstanceProfileInfoV(
&self,
gpuInstance: nvmlGpuInstance_t,
profile: raw::c_uint,
engProfile: raw::c_uint,
info: *mut nvmlComputeInstanceProfileInfo_v2_t,
) -> nvmlReturn_t {
(self
.nvmlGpuInstanceGetComputeInstanceProfileInfoV
.as_ref()
.expect("Expected function, got error."))(gpuInstance, profile, engProfile, info)
}
pub unsafe fn nvmlGpuInstanceGetComputeInstanceRemainingCapacity(
&self,
gpuInstance: nvmlGpuInstance_t,
profileId: raw::c_uint,
count: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlGpuInstanceGetComputeInstanceRemainingCapacity
.as_ref()
.expect("Expected function, got error."))(gpuInstance, profileId, count)
}
pub unsafe fn nvmlGpuInstanceCreateComputeInstance(
&self,
gpuInstance: nvmlGpuInstance_t,
profileId: raw::c_uint,
computeInstance: *mut nvmlComputeInstance_t,
) -> nvmlReturn_t {
(self
.nvmlGpuInstanceCreateComputeInstance
.as_ref()
.expect("Expected function, got error."))(
gpuInstance, profileId, computeInstance
)
}
pub unsafe fn nvmlComputeInstanceDestroy(
&self,
computeInstance: nvmlComputeInstance_t,
) -> nvmlReturn_t {
(self
.nvmlComputeInstanceDestroy
.as_ref()
.expect("Expected function, got error."))(computeInstance)
}
pub unsafe fn nvmlGpuInstanceGetComputeInstances(
&self,
gpuInstance: nvmlGpuInstance_t,
profileId: raw::c_uint,
computeInstances: *mut nvmlComputeInstance_t,
count: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlGpuInstanceGetComputeInstances
.as_ref()
.expect("Expected function, got error."))(
gpuInstance,
profileId,
computeInstances,
count,
)
}
pub unsafe fn nvmlGpuInstanceGetComputeInstanceById(
&self,
gpuInstance: nvmlGpuInstance_t,
id: raw::c_uint,
computeInstance: *mut nvmlComputeInstance_t,
) -> nvmlReturn_t {
(self
.nvmlGpuInstanceGetComputeInstanceById
.as_ref()
.expect("Expected function, got error."))(gpuInstance, id, computeInstance)
}
pub unsafe fn nvmlComputeInstanceGetInfo_v2(
&self,
computeInstance: nvmlComputeInstance_t,
info: *mut nvmlComputeInstanceInfo_t,
) -> nvmlReturn_t {
(self
.nvmlComputeInstanceGetInfo_v2
.as_ref()
.expect("Expected function, got error."))(computeInstance, info)
}
pub unsafe fn nvmlDeviceIsMigDeviceHandle(
&self,
device: nvmlDevice_t,
isMigDevice: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceIsMigDeviceHandle
.as_ref()
.expect("Expected function, got error."))(device, isMigDevice)
}
pub unsafe fn nvmlDeviceGetGpuInstanceId(
&self,
device: nvmlDevice_t,
id: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGpuInstanceId
.as_ref()
.expect("Expected function, got error."))(device, id)
}
pub unsafe fn nvmlDeviceGetComputeInstanceId(
&self,
device: nvmlDevice_t,
id: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetComputeInstanceId
.as_ref()
.expect("Expected function, got error."))(device, id)
}
pub unsafe fn nvmlDeviceGetMaxMigDeviceCount(
&self,
device: nvmlDevice_t,
count: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMaxMigDeviceCount
.as_ref()
.expect("Expected function, got error."))(device, count)
}
pub unsafe fn nvmlDeviceGetMigDeviceHandleByIndex(
&self,
device: nvmlDevice_t,
index: raw::c_uint,
migDevice: *mut nvmlDevice_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMigDeviceHandleByIndex
.as_ref()
.expect("Expected function, got error."))(device, index, migDevice)
}
pub unsafe fn nvmlDeviceGetDeviceHandleFromMigDeviceHandle(
&self,
migDevice: nvmlDevice_t,
device: *mut nvmlDevice_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetDeviceHandleFromMigDeviceHandle
.as_ref()
.expect("Expected function, got error."))(migDevice, device)
}
pub unsafe fn nvmlDeviceGetBusType(
&self,
device: nvmlDevice_t,
type_: *mut nvmlBusType_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetBusType
.as_ref()
.expect("Expected function, got error."))(device, type_)
}
pub unsafe fn nvmlDeviceGetDynamicPstatesInfo(
&self,
device: nvmlDevice_t,
pDynamicPstatesInfo: *mut nvmlGpuDynamicPstatesInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetDynamicPstatesInfo
.as_ref()
.expect("Expected function, got error."))(device, pDynamicPstatesInfo)
}
pub unsafe fn nvmlDeviceSetFanSpeed_v2(
&self,
device: nvmlDevice_t,
fan: raw::c_uint,
speed: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetFanSpeed_v2
.as_ref()
.expect("Expected function, got error."))(device, fan, speed)
}
pub unsafe fn nvmlDeviceGetGpcClkVfOffset(
&self,
device: nvmlDevice_t,
offset: *mut raw::c_int,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGpcClkVfOffset
.as_ref()
.expect("Expected function, got error."))(device, offset)
}
pub unsafe fn nvmlDeviceSetGpcClkVfOffset(
&self,
device: nvmlDevice_t,
offset: raw::c_int,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetGpcClkVfOffset
.as_ref()
.expect("Expected function, got error."))(device, offset)
}
pub unsafe fn nvmlDeviceGetMemClkVfOffset(
&self,
device: nvmlDevice_t,
offset: *mut raw::c_int,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMemClkVfOffset
.as_ref()
.expect("Expected function, got error."))(device, offset)
}
pub unsafe fn nvmlDeviceSetMemClkVfOffset(
&self,
device: nvmlDevice_t,
offset: raw::c_int,
) -> nvmlReturn_t {
(self
.nvmlDeviceSetMemClkVfOffset
.as_ref()
.expect("Expected function, got error."))(device, offset)
}
pub unsafe fn nvmlDeviceGetMinMaxClockOfPState(
&self,
device: nvmlDevice_t,
type_: nvmlClockType_t,
pstate: nvmlPstates_t,
minClockMHz: *mut raw::c_uint,
maxClockMHz: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMinMaxClockOfPState
.as_ref()
.expect("Expected function, got error."))(
device,
type_,
pstate,
minClockMHz,
maxClockMHz,
)
}
pub unsafe fn nvmlDeviceGetSupportedPerformanceStates(
&self,
device: nvmlDevice_t,
pstates: *mut nvmlPstates_t,
size: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetSupportedPerformanceStates
.as_ref()
.expect("Expected function, got error."))(device, pstates, size)
}
pub unsafe fn nvmlDeviceGetGpcClkMinMaxVfOffset(
&self,
device: nvmlDevice_t,
minOffset: *mut raw::c_int,
maxOffset: *mut raw::c_int,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGpcClkMinMaxVfOffset
.as_ref()
.expect("Expected function, got error."))(device, minOffset, maxOffset)
}
pub unsafe fn nvmlDeviceGetMemClkMinMaxVfOffset(
&self,
device: nvmlDevice_t,
minOffset: *mut raw::c_int,
maxOffset: *mut raw::c_int,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMemClkMinMaxVfOffset
.as_ref()
.expect("Expected function, got error."))(device, minOffset, maxOffset)
}
pub unsafe fn nvmlGpmMetricsGet(&self, metricsGet: *mut nvmlGpmMetricsGet_t) -> nvmlReturn_t {
(self
.nvmlGpmMetricsGet
.as_ref()
.expect("Expected function, got error."))(metricsGet)
}
pub unsafe fn nvmlGpmSampleFree(&self, gpmSample: nvmlGpmSample_t) -> nvmlReturn_t {
(self
.nvmlGpmSampleFree
.as_ref()
.expect("Expected function, got error."))(gpmSample)
}
pub unsafe fn nvmlGpmSampleAlloc(&self, gpmSample: *mut nvmlGpmSample_t) -> nvmlReturn_t {
(self
.nvmlGpmSampleAlloc
.as_ref()
.expect("Expected function, got error."))(gpmSample)
}
pub unsafe fn nvmlGpmSampleGet(
&self,
device: nvmlDevice_t,
gpmSample: nvmlGpmSample_t,
) -> nvmlReturn_t {
(self
.nvmlGpmSampleGet
.as_ref()
.expect("Expected function, got error."))(device, gpmSample)
}
pub unsafe fn nvmlGpmQueryDeviceSupport(
&self,
device: nvmlDevice_t,
gpmSupport: *mut nvmlGpmSupport_t,
) -> nvmlReturn_t {
(self
.nvmlGpmQueryDeviceSupport
.as_ref()
.expect("Expected function, got error."))(device, gpmSupport)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlInit(&self) -> nvmlReturn_t {
(self
.nvmlInit
.as_ref()
.expect("Expected function, got error."))()
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetCount(&self, deviceCount: *mut raw::c_uint) -> nvmlReturn_t {
(self
.nvmlDeviceGetCount
.as_ref()
.expect("Expected function, got error."))(deviceCount)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetHandleByIndex(
&self,
index: raw::c_uint,
device: *mut nvmlDevice_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetHandleByIndex
.as_ref()
.expect("Expected function, got error."))(index, device)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetHandleByPciBusId(
&self,
pciBusId: *const raw::c_char,
device: *mut nvmlDevice_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetHandleByPciBusId
.as_ref()
.expect("Expected function, got error."))(pciBusId, device)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetPciInfo(
&self,
device: nvmlDevice_t,
pci: *mut nvmlPciInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPciInfo
.as_ref()
.expect("Expected function, got error."))(device, pci)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetPciInfo_v2(
&self,
device: nvmlDevice_t,
pci: *mut nvmlPciInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetPciInfo_v2
.as_ref()
.expect("Expected function, got error."))(device, pci)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetNvLinkRemotePciInfo(
&self,
device: nvmlDevice_t,
link: raw::c_uint,
pci: *mut nvmlPciInfo_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetNvLinkRemotePciInfo
.as_ref()
.expect("Expected function, got error."))(device, link, pci)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetGridLicensableFeatures(
&self,
device: nvmlDevice_t,
pGridLicensableFeatures: *mut nvmlGridLicensableFeatures_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGridLicensableFeatures
.as_ref()
.expect("Expected function, got error."))(device, pGridLicensableFeatures)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetGridLicensableFeatures_v2(
&self,
device: nvmlDevice_t,
pGridLicensableFeatures: *mut nvmlGridLicensableFeatures_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGridLicensableFeatures_v2
.as_ref()
.expect("Expected function, got error."))(device, pGridLicensableFeatures)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetGridLicensableFeatures_v3(
&self,
device: nvmlDevice_t,
pGridLicensableFeatures: *mut nvmlGridLicensableFeatures_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGridLicensableFeatures_v3
.as_ref()
.expect("Expected function, got error."))(device, pGridLicensableFeatures)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceRemoveGpu(&self, pciInfo: *mut nvmlPciInfo_t) -> nvmlReturn_t {
(self
.nvmlDeviceRemoveGpu
.as_ref()
.expect("Expected function, got error."))(pciInfo)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlEventSetWait(
&self,
set: nvmlEventSet_t,
data: *mut nvmlEventData_t,
timeoutms: raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlEventSetWait
.as_ref()
.expect("Expected function, got error."))(set, data, timeoutms)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetAttributes(
&self,
device: nvmlDevice_t,
attributes: *mut nvmlDeviceAttributes_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetAttributes
.as_ref()
.expect("Expected function, got error."))(device, attributes)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlComputeInstanceGetInfo(
&self,
computeInstance: nvmlComputeInstance_t,
info: *mut nvmlComputeInstanceInfo_t,
) -> nvmlReturn_t {
(self
.nvmlComputeInstanceGetInfo
.as_ref()
.expect("Expected function, got error."))(computeInstance, info)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetComputeRunningProcesses(
&self,
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v1_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetComputeRunningProcesses
.as_ref()
.expect("Expected function, got error."))(device, infoCount, infos)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetComputeRunningProcesses_v2(
&self,
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v2_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetComputeRunningProcesses_v2
.as_ref()
.expect("Expected function, got error."))(device, infoCount, infos)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetGraphicsRunningProcesses(
&self,
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v1_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGraphicsRunningProcesses
.as_ref()
.expect("Expected function, got error."))(device, infoCount, infos)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetGraphicsRunningProcesses_v2(
&self,
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v2_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGraphicsRunningProcesses_v2
.as_ref()
.expect("Expected function, got error."))(device, infoCount, infos)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetMPSComputeRunningProcesses(
&self,
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v1_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMPSComputeRunningProcesses
.as_ref()
.expect("Expected function, got error."))(device, infoCount, infos)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetMPSComputeRunningProcesses_v2(
&self,
device: nvmlDevice_t,
infoCount: *mut raw::c_uint,
infos: *mut nvmlProcessInfo_v2_t,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetMPSComputeRunningProcesses_v2
.as_ref()
.expect("Expected function, got error."))(device, infoCount, infos)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlDeviceGetGpuInstancePossiblePlacements(
&self,
device: nvmlDevice_t,
profileId: raw::c_uint,
placements: *mut nvmlGpuInstancePlacement_t,
count: *mut raw::c_uint,
) -> nvmlReturn_t {
(self
.nvmlDeviceGetGpuInstancePossiblePlacements
.as_ref()
.expect("Expected function, got error."))(device, profileId, placements, count)
}
#[cfg(feature = "legacy-functions")]
pub unsafe fn nvmlVgpuInstanceGetLicenseInfo(
&self,
vgpuInstance: nvmlVgpuInstance_t,
licenseInfo: *mut nvmlVgpuLicenseInfo_t,
) -> nvmlReturn_t {
(self
.nvmlVgpuInstanceGetLicenseInfo
.as_ref()
.expect("Expected function, got error."))(vgpuInstance, licenseInfo)
}
}
nvml-wrapper-sys-0.7.0/src/lib.rs 0000644 0000000 0000000 00000005433 10461020230 0015006 0 ustar 0000000 0000000 /*!
Rust bindings for the [NVIDIA Management Library][nvml] (NVML), a C-based programmatic
interface for monitoring and managing various states within NVIDIA GPUs.
It is intended to be a platform for building 3rd-party applications, and is also the
underlying library for NVIDIA's nvidia-smi tool.
See [`nvml-wrapper`][nvml-wrapper] for a safe wrapper over top of these bindings.
## Type of Bindings
These bindings were created using [bindgen]'s feature to generate wrappers over top
of the functionality that the [`libloading`][libloading] crate provides. This means
that they're designed for loading the NVML library at runtime; they are not suitable
for linking to NVML (statically or dynamically) at buildtime.
This choice was made because NVML is the type of library that you'd realistically
always want to load at runtime, for the following reasons:
* NVIDIA doesn't distribute static versions of NVML, so it isn't possible to statically
link it anyway
* Linking to NVML at buildtime means the resulting binary can only be run on systems
that have NVIDIA GPUs and well-formed NVIDIA driver installs
Loading NVML at runtime means it's possible to drop NVIDIA-related features at runtime
on systems that don't have relevant hardware.
I would be willing to consider maintaining both types of bindings in this crate if
there's a convincing reason to do so; please file an issue.
## NVML Support
These bindings were generated for NVML version 11. Each new version of NVML is
guaranteed to be backwards-compatible according to NVIDIA, so these bindings
should be useful regardless of NVML version bumps.
### Legacy Functions
Sometimes there will be function-level API version bumps in new NVML releases.
For example:
```text
nvmlDeviceGetComputeRunningProcesses
nvmlDeviceGetComputeRunningProcesses_v2
nvmlDeviceGetComputeRunningProcesses_v3
```
The older versions of the functions will generally continue to work with the
newer NVML releases; however, the newer function versions will not work with
older NVML installs.
By default these bindings only include the newest versions of the functions.
Enable the `legacy-functions` feature if you require the ability to call older
functions.
[nvml]: https://developer.nvidia.com/nvidia-management-library-nvml
[nvml-wrapper]: https://github.com/Cldfire/nvml-wrapper
[bindgen]: https://github.com/rust-lang/rust-bindgen
[libloading]: https://github.com/nagisa/rust_libloading
*/
// bindgen generates code that triggers these lints
#![allow(clippy::missing_safety_doc)]
#![allow(clippy::redundant_static_lifetimes)]
// Generate bindings: ./gen_bindings.sh
//
// We avoid generating layout tests because they cause a large number of
// warnings and according to commentary are not useful. See
// https://github.com/rust-lang/rust-bindgen/issues/1651 for more.
pub mod bindings;