using System.Runtime.InteropServices; using NvAPIWrapper.Native.Attributes; using NvAPIWrapper.Native.General.Structures; using NvAPIWrapper.Native.Interfaces; namespace NvAPIWrapper.Native.GPU.Structures { /// /// Contains information regarding GPU PCI-e connection configurations /// [StructLayout(LayoutKind.Sequential, Pack = 8)] [StructureVersion(2)] public struct PrivatePCIeInfoV2 : IInitializable { internal StructureVersion _Version; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] internal readonly PCIePerformanceStateInfo[] _PCIePerformanceStateInfos; /// /// Gets the list of performance state PCI-e configurations information /// public PCIePerformanceStateInfo[] PCIePerformanceStateInfos { get => _PCIePerformanceStateInfos; } /// /// Contains information regarding a performance state PCI-e connection /// [StructLayout(LayoutKind.Sequential, Pack = 8)] public struct PCIePerformanceStateInfo { internal readonly uint _TransferRate; internal readonly PCIeGeneration _Version; internal readonly uint _LanesNumber; internal readonly PCIeGeneration _Generation; /// /// Gets the PCI-e transfer rate in Mega Transfers per Second /// public uint TransferRateInMTps { get => _TransferRate; } /// /// Gets the PCI-e generation /// public PCIeGeneration Generation { get => _Generation; } /// /// Gets the PCI-e down stream lanes /// public uint Lanes { get => _LanesNumber; } /// /// Gets the PCI-e version /// public PCIeGeneration Version { get => _Version; } } } }