using NvAPIWrapper.Native;
namespace NvAPIWrapper.GPU
{
///
/// Contains physical GPU architect information
///
public class GPUArchitectInformation
{
internal GPUArchitectInformation(PhysicalGPU physicalGPU)
{
PhysicalGPU = physicalGPU;
}
///
/// Gets total number of cores defined for this GPU, or zero for older architectures
///
public int NumberOfCores
{
get => (int) GPUApi.GetGPUCoreCount(PhysicalGPU.Handle);
}
///
/// Gets the number of graphics processing clusters (aka GPU Partitions)
///
public int NumberOfGPC
{
get => (int) GPUApi.GetPartitionCount(PhysicalGPU.Handle);
}
///
/// Gets the number of render output units
///
public int NumberOfROPs
{
get => (int) GPUApi.GetROPCount(PhysicalGPU.Handle);
}
///
/// Gets the number of shader pipelines
///
public int NumberOfShaderPipelines
{
get => (int) GPUApi.GetShaderPipeCount(PhysicalGPU.Handle);
}
///
/// Gets the number of shader sub pipelines
///
public int NumberOfShaderSubPipelines
{
get => (int) GPUApi.GetShaderSubPipeCount(PhysicalGPU.Handle);
}
///
/// Gets the number of video processing engines
///
public int NumberOfVPEs
{
get => (int) GPUApi.GetVPECount(PhysicalGPU.Handle);
}
///
/// Gets the physical GPU that this instance describes
///
public PhysicalGPU PhysicalGPU { get; }
///
/// Gets the GPU revision number (should be displayed as a hex string)
///
public int Revision
{
get => (int) GPUApi.GetArchitectInfo(PhysicalGPU.Handle).Revision;
}
///
/// Gets the GPU short name (aka Codename)
///
public string ShortName
{
get => GPUApi.GetShortName(PhysicalGPU.Handle);
}
///
/// Gets the total number of streaming multiprocessors
///
public int TotalNumberOfSMs
{
get => (int) GPUApi.GetTotalSMCount(PhysicalGPU.Handle);
}
///
/// Gets the total number of streaming processors
///
public int TotalNumberOfSPs
{
get => (int) GPUApi.GetTotalSPCount(PhysicalGPU.Handle);
}
///
/// Gets the total number of texture processing clusters
///
public int TotalNumberOfTPCs
{
get => (int) GPUApi.GetTotalTPCCount(PhysicalGPU.Handle);
}
///
public override string ToString()
{
return $"[{ShortName} REV{Revision:X}] Cores: {NumberOfCores}";
}
}
}