public static NvmlReturn GetDeviceUUID(NvmlDevice device, out string uuid) { StringBuilder builder = new StringBuilder(DEVICE_UUID_BUFFER_SIZE); NvmlReturn result = NvmlDeviceGetUUID(device, builder, DEVICE_UUID_BUFFER_SIZE); uuid = builder.ToString(); return(result); }
public static NvmlReturn GetDeviceName(NvmlDevice device, out string name) { StringBuilder builder = new StringBuilder(DEVICE_NAME_BUFFER_SIZE); NvmlReturn result = NvmlDeviceGetName(device, builder, DEVICE_NAME_BUFFER_SIZE); name = builder.ToString(); return(result); }
public static NvmlReturn GetDeviceVbiosVersionString(NvmlDevice device, out string version) { StringBuilder builder = new StringBuilder(DEVICE_VBIOS_VERSION_BUFFER_SIZE); NvmlReturn result = NvmlDeviceGetVbiosVersion(device, builder, DEVICE_VBIOS_VERSION_BUFFER_SIZE); version = builder.ToString(); return(result); }
public static NvmlReturn GetDeviceUUID(uint index, out string uuid) { NvmlReturn result; NvmlDevice device = new NvmlDevice(); result = NvmlDeviceGetHandleByIndex(index, ref device); if (result == NvmlReturn.SUCCESS) { return(GetDeviceUUID(device, out uuid)); } else { uuid = ""; } return(result); }
public static NvmlReturn GetDeviceVbiosVersionString(uint index, out string version) { NvmlReturn result; NvmlDevice device = new NvmlDevice(); result = NvmlDeviceGetHandleByIndex(index, ref device); if (result == NvmlReturn.SUCCESS) { return(GetDeviceVbiosVersionString(device, out version)); } else { version = ""; } return(result); }
public static NvmlReturn GetDeviceName(uint index, out string name) { NvmlReturn result; NvmlDevice device = new NvmlDevice(); result = NvmlDeviceGetHandleByIndex(index, ref device); if (result == NvmlReturn.SUCCESS) { return(GetDeviceName(device, out name)); } else { name = ""; } return(result); }
internal int?NvmlDeviceGetPowerUsage(NvmlDevice nvmlDevice) { if (Initialised) { int powerUsage; if (Software.OperatingSystem.IsLinux) { if (LinuxNvmlDeviceGetPowerUsage(nvmlDevice, out powerUsage) == NvmlReturn.Success) { return(powerUsage); } } else if (WindowsNvmlDeviceGetPowerUsage(nvmlDevice, out powerUsage) == NvmlReturn.Success) { return(powerUsage); } } return(null); }
internal NvmlDevice?NvmlDeviceGetHandleByIndex(int index) { if (Initialised) { var nvmlDevice = new NvmlDevice(); if (Software.OperatingSystem.IsLinux) { try { if (LinuxNvmlDeviceGetHandleByIndex(Convert.ToUInt32(index), ref nvmlDevice) == NvmlReturn.Success) { return(nvmlDevice); } } catch (EntryPointNotFoundException) { if (LinuxNvmlDeviceGetHandleByIndexLegacy(Convert.ToUInt32(index), ref nvmlDevice) == NvmlReturn.Success) { return(nvmlDevice); } } } else { try { if (WindowsNvmlDeviceGetHandleByIndex(Convert.ToUInt32(index), ref nvmlDevice) == NvmlReturn.Success) { return(nvmlDevice); } } catch (EntryPointNotFoundException) { if (WindowsNvmlDeviceGetHandleByIndexLegacy(Convert.ToUInt32(index), ref nvmlDevice) == NvmlReturn.Success) { return(nvmlDevice); } } } } return(null); }
public static extern NvmlReturn NvmlDeviceGetVbiosVersion( NvmlDevice device, StringBuilder version, uint length);
public static extern NvmlReturn NvmlDeviceGetSupportedClocksThrottleReasons( NvmlDevice device, out ulong supportedClocksThrottleReasons);
public static extern NvmlReturn NvmlDeviceGetSerial( NvmlDevice device, StringBuilder serial, uint length);
public static extern NvmlReturn NvmlDeviceGetTemperature( NvmlDevice device, NvmlTemperatureSensors sensorType, out uint temp);
public static extern NvmlReturn NvmlDeviceGetSupportedMemoryClocks( NvmlDevice device, out uint count, [Out] uint[] clocksMHz);
public static extern NvmlReturn NvmlDeviceGetTopologyCommonAncestor( NvmlDevice device1, NvmlDevice device2, out NvmlGpuTopologyLevel pathInfo);
public static extern NvmlReturn NvmlDeviceGetTemperatureThreshold( NvmlDevice device, NvmlTemperatureThresholds thresholdType, out uint temp);
public static extern NvmlReturn NvmlDeviceGetSamples( NvmlDevice device, NvmlSamplingType type, ulong lastSeenTimeStamp, out NvmlValueType sampleValType, out uint sampleCount, [Out] NvmlSample[] samples);
public static extern NvmlReturn NvmlSystemGetTopologyGpuSet( uint cpuNumber, out uint count, ref NvmlDevice deviceArray);
private static extern NvmlReturn LinuxNvmlDeviceGetHandleByIndex(uint index, ref NvmlDevice device);
private static extern NvmlReturn LinuxNvmlDeviceGetHandleByIndexLegacy(int index, out NvmlDevice device);
private static extern NvmlReturn WindowsNvmlDeviceGetHandleByIndexLegacy(uint index, ref NvmlDevice device);
public static extern NvmlReturn NvmlDeviceGetUtilizationRates( NvmlDevice device, ref NvmlUtilization utilization);
public static extern NvmlReturn NvmlDeviceGetUUID( NvmlDevice device, StringBuilder uuid, uint length);
public static extern NvmlReturn NvmlDeviceGetTotalEccErrors( NvmlDevice device, NvmlMemoryErrorType errorType, NvmlEccCounterType counterType, out ulong eccCounts);
public static extern NvmlReturn NvmlDeviceGetTopologyNearestGpus( NvmlDevice device, NvmlGpuTopologyLevel level, out uint count, ref NvmlDevice deviceArray);
private static extern NvmlReturn WindowsNvmlDeviceGetPowerUsage(NvmlDevice device, ref uint power);
public static extern NvmlReturn NvmlDeviceGetViolationStatus( NvmlDevice device, NvmlPerfPolicyType perfPolicyType, ref NvmlViolationTime violTime);
public static extern NvmlReturn NvmlDeviceOnSameBoard( NvmlDevice device1, NvmlDevice device2, out bool onSameBoard);
public static extern NvmlReturn NvmlDeviceValidateInforom( NvmlDevice device);
private static extern NvmlReturn LinuxNvmlDeviceGetPowerUsage(NvmlDevice device, out int power);
public static extern NvmlReturn NvmlDeviceGetRetiredPagesPendingStatus( NvmlDevice device, out NvmlEnableState isPending);