示例#1
0
 // GPU AMD
 /// <summary>
 /// Initializes a new instance of the <see cref="ComputeDevice"/> class.
 /// </summary>
 /// <param name="amdDevice">The <see cref="AmdGpuDevice"/></param>
 /// <param name="GPUCount">The <see cref="int"/></param>
 /// <param name="isDetectionFallback">The <see cref="bool"/></param>
 public ComputeDevice(AmdGpuDevice amdDevice, int GPUCount, bool isDetectionFallback)
 {
     ID              = amdDevice.DeviceID;
     BusID           = amdDevice.BusID;
     DeviceGroupType = DeviceGroupType.AMD_OpenCL;
     Name            = amdDevice.DeviceName;
     Enabled         = true;
     IsEtherumCapale = amdDevice.IsEtherumCapable();
     DeviceType      = DeviceType.AMD;
     NameCount       = String.Format(International.GetText("ComputeDevice_Short_Name_AMD_GPU"), GPUCount);
     if (isDetectionFallback)
     {
         UUID = GetUUID(ID, GroupNames.GetGroupName(DeviceGroupType, ID), Name, DeviceGroupType);
     }
     else
     {
         UUID = amdDevice.UUID;
     }
     // sgminer extra
     //IsOptimizedVersion = amdDevice.UseOptimizedVersion;
     Codename           = amdDevice.Codename;
     InfSection         = amdDevice.InfSection;
     AlgorithmSettings  = GroupAlgorithms.CreateForDeviceList(this);
     DriverDisableAlgos = amdDevice.DriverDisableAlgos;
     GpuRam             = amdDevice.DeviceGlobalMemory;
 }
示例#2
0
 public AmdComputeDevice(AmdGpuDevice amdDevice, int GPUCount, bool isDetectionFallback)
     : base(amdDevice.DeviceID,
            amdDevice.DeviceName,
            true,
            DeviceGroupType.AMD_OpenCL,
            amdDevice.IsEtherumCapable(),
            DeviceType.AMD,
            String.Format(International.GetText("ComputeDevice_Short_Name_AMD_GPU"), GPUCount),
            amdDevice.DeviceGlobalMemory)
 {
     if (isDetectionFallback)
     {
         UUID = GetUUID(ID, GroupNames.GetGroupName(DeviceGroupType, ID), Name, DeviceGroupType);
     }
     else
     {
         UUID = amdDevice.UUID;
     }
     BusID              = amdDevice.BusID;
     Codename           = amdDevice.Codename;
     InfSection         = amdDevice.InfSection;
     AlgorithmSettings  = GroupAlgorithms.CreateForDeviceList(this);
     DriverDisableAlgos = amdDevice.DriverDisableAlgos;
     Index              = ID + ComputeDeviceManager.Avaliable.AvailCPUs + ComputeDeviceManager.Avaliable.AvailNVGPUs;
     adapterIndex       = amdDevice.AdapterIndex;
 }