Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ComputeDevice"/> class.
 /// </summary>
 /// <param name="cudaDevice">The <see cref="CudaDevice"/></param>
 /// <param name="group">The <see cref="DeviceGroupType"/></param>
 /// <param name="GPUCount">The <see cref="int"/></param>
 public ComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int GPUCount)
 {
     _SM_major         = cudaDevice.SM_major;
     _SM_minor         = cudaDevice.SM_minor;
     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.CreateForDeviceList(this);
     GpuRam            = cudaDevice.DeviceGlobalMemory;
 }
        public CudaComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int GPUCount, NvPhysicalGpuHandle nvHandle)
            : base((int)cudaDevice.DeviceID,
                   cudaDevice.GetName(),
                   true,
                   group,
                   cudaDevice.IsEtherumCapable(),
                   DeviceType.NVIDIA,
                   String.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), GPUCount),
                   cudaDevice.DeviceGlobalMemory)
        {
            BusID             = cudaDevice.pciBusID;
            _SM_major         = cudaDevice.SM_major;
            _SM_minor         = cudaDevice.SM_minor;
            UUID              = cudaDevice.UUID;
            AlgorithmSettings = GroupAlgorithms.CreateForDeviceList(this);
            Index             = ID + ComputeDeviceManager.Avaliable.AvailCPUs; // increment by CPU count

            this.nvHandle = nvHandle;
        }
        public CudaComputeDevice(CudaDevice cudaDevice, DeviceGroupType group, int gpuCount,
                                 NvPhysicalGpuHandle nvHandle, nvmlDevice nvmlHandle)
            : base((int)cudaDevice.DeviceID,
                   cudaDevice.GetName(),
                   true,
                   group,
                   cudaDevice.IsEtherumCapable(),
                   DeviceType.NVIDIA,
                   string.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), gpuCount),
                   cudaDevice.DeviceGlobalMemory)
        {
            BusID             = cudaDevice.pciBusID;
            SMMajor           = cudaDevice.SM_major;
            SMMinor           = cudaDevice.SM_minor;
            UUID              = cudaDevice.UUID;
            AlgorithmSettings = GroupAlgorithms.CreateForDeviceList(this);
            Index             = ID + ComputeDeviceManager.Avaliable.AvailCPUs; // increment by CPU count

            _nvHandle             = nvHandle;
            nvmlDevice            = nvmlHandle;
            ShouldRunEthlargement = cudaDevice.DeviceName.Contains("1080") || cudaDevice.DeviceName.Contains("Titan Xp");
        }