예제 #1
0
    public List <GPU_info> get_gpu_info_list()
    {
        int size     = 0;
        var gpu_list = new List <GPU_info>();

        for (int gpu_index = 0; gpu_index < pSDK.GetNumberOfDisplayAdapter(); gpu_index += 1)
        {
            var gpu        = new GPU_info();
            var perf_level = pSDK.GetDisplayAdapterCurrentPerformanceLevel(gpu_index);
            gpu.name        = pSDK.GetDisplayAdapterName(gpu_index);
            gpu.code_name   = pSDK.GetDisplayAdapterCodeName(gpu_index);
            gpu.clock       = pSDK.GetDisplayAdapterClock(gpu_index, perf_level, CPUIDSDK.DISPLAY_CLOCK_DOMAIN_GRAPHICS);
            gpu.stock_clock = pSDK.GetDisplayAdapterStockClock(gpu_index, perf_level, CPUIDSDK.DISPLAY_CLOCK_DOMAIN_GRAPHICS);
            pSDK.GetDisplayAdapterMemorySize(gpu_index, ref size);
            gpu.memory_size = size;
            gpu_list.Add(gpu);
        }
        return(gpu_list);
    }