// GPU NVIDIA public ComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int GPUCount) { ID = (int)cudaDevice.DeviceID; Name = cudaDevice.GetName(); Enabled = true; DeviceGroupType = group; IsEtherumCapale = cudaDevice.IsEtherumCapable(); DeviceType = DeviceType.NVIDIA; NameCount = String.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), GPUCount); UUID = cudaDevice.UUID; AlgorithmSettings = GroupAlgorithms.CreateForDevice(this); }
// CPU public ComputeDevice(int id, string group, string name, int threads, ulong affinityMask, int CPUCount) { ID = id; Name = name; Threads = threads; AffinityMask = affinityMask; Enabled = true; DeviceGroupType = DeviceGroupType.CPU; DeviceType = DeviceType.CPU; NameCount = String.Format(International.GetText("ComputeDevice_Short_Name_CPU"), CPUCount); UUID = GetUUID(ID, GroupNames.GetGroupName(DeviceGroupType, ID), Name, DeviceGroupType); AlgorithmSettings = GroupAlgorithms.CreateForDevice(this); IsEtherumCapale = false; }
// GPU AMD public ComputeDevice(AmdGpuDevice amdDevice, int GPUCount) { ID = amdDevice.DeviceID; 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); UUID = amdDevice.UUID; // sgminer extra IsOptimizedVersion = amdDevice.UseOptimizedVersion; Codename = amdDevice.Codename; AlgorithmSettings = GroupAlgorithms.CreateForDevice(this); }
// GPU AMD public ComputeDevice(AmdGpuDevice amdDevice, int GPUCount, bool isDetectionFallback) { ID = amdDevice.DeviceID; 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.CreateForDevice(this); }