mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using System.Runtime.InteropServices;
|
|
using NvAPIWrapper.Native.Helpers;
|
|
|
|
namespace NvAPIWrapper.Native.GPU.Structures
|
|
{
|
|
/// <summary>
|
|
/// Holds information about the clock frequency of an specific clock domain
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Sequential, Pack = 8)]
|
|
public struct ClockDomainInfo
|
|
{
|
|
internal readonly uint _IsPresent;
|
|
internal readonly uint _Frequency;
|
|
|
|
/// <summary>
|
|
/// Gets a boolean value that indicates if this clock domain is present on this GPU and with the requested clock type.
|
|
/// </summary>
|
|
public bool IsPresent
|
|
{
|
|
get => _IsPresent.GetBit(0);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the clock frequency in kHz
|
|
/// </summary>
|
|
public uint Frequency
|
|
{
|
|
get => _Frequency;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override string ToString()
|
|
{
|
|
return IsPresent ? $"{_Frequency:N0} kHz" : "N/A";
|
|
}
|
|
}
|
|
} |