Update project files and configurations for improved structure and maintainability

This commit is contained in:
Phoenix
2025-08-07 16:53:10 +08:00
parent 3b3bdf3d46
commit 3f64ace8a7
11 changed files with 1062 additions and 837 deletions
+17
View File
@@ -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;
}
}