/// <summary> /// Create a GpuTuple that refers to a vGPU type which is a sub-item of a GPU group /// </summary> public GpuTuple(GPU_group gpuGroup, VGPU_type vgpuType, VGPU_type[] disabledVGpuTypes) { GpuGroup = gpuGroup; VgpuTypes = vgpuType == null ? null : new[] { vgpuType }; if (vgpuType != null) { IsVgpuSubitem = gpuGroup.HasVGpu(); if (disabledVGpuTypes != null && disabledVGpuTypes.Select(t => t.opaque_ref).Contains(vgpuType.opaque_ref)) { Enabled = false; } } UpdateDisplayName(); }
/// <summary> /// Create a GpuTuple that refers to a vGPU type which is a subitem of a GPU group /// </summary> public GpuTuple(GPU_group gpuGroup, VGPU_type vgpuType, VGPU_type[] disabledVGpuTypes) { GpuGroup = gpuGroup; VgpuTypes = vgpuType == null ? null : new[] { vgpuType }; if (vgpuType != null) { IsVgpuSubitem = gpuGroup.HasVGpu(); IsFractionalVgpu = !vgpuType.IsPassthrough(); if (disabledVGpuTypes != null && disabledVGpuTypes.Select(t => t.opaque_ref).Contains(vgpuType.opaque_ref)) { IsNotEnabledVgpu = true; } } UpdateDisplayName(); }