Update project files and configurations for improved structure and maintainability
This commit is contained in:
@@ -30,10 +30,27 @@ public static class NvmlWrapper
|
||||
[DllImport("nvml.dll", EntryPoint = "nvmlDeviceGetFanSpeed")]
|
||||
public static extern int NvmlDeviceGetFanSpeed(IntPtr device, out uint speed);
|
||||
|
||||
[DllImport("nvml.dll", EntryPoint = "nvmlDeviceGetMemoryInfo")]
|
||||
public static extern int NvmlDeviceGetMemoryInfo(IntPtr device, out NvmlMemory memory);
|
||||
|
||||
[DllImport("nvml.dll", EntryPoint = "nvmlDeviceGetPowerUsage")]
|
||||
public static extern int NvmlDeviceGetPowerUsage(IntPtr device, out uint power);
|
||||
|
||||
[DllImport("nvml.dll", EntryPoint = "nvmlDeviceGetName")]
|
||||
public static extern int NvmlDeviceGetName(IntPtr device, byte[] name, uint length);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct NvmlUtilization
|
||||
{
|
||||
public uint Gpu;
|
||||
public uint Memory;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct NvmlMemory
|
||||
{
|
||||
public ulong Total;
|
||||
public ulong Free;
|
||||
public ulong Used;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user