Esempio n. 1
0
 // CPU
 public ComputeDevice(int id, string group, string name, bool addToGlobalList = false, bool enabled = true)
 {
     ID                = id;
     Group             = group;
     Name              = name;
     _nameNoNums       = name;
     Enabled           = enabled;
     DeviceGroupType   = GroupNames.GetType(Group);
     DeviceGroupString = GroupNames.GetNameGeneral(DeviceGroupType);
     DeviceType        = DeviceType.CPU;
     InitGlobalsList(addToGlobalList);
     NameCount = String.Format(International.GetText("ComputeDevice_Short_Name_CPU"), ++CPUCount);
     UUID      = GetUUID(ID, Group, Name, DeviceGroupType);
 }
Esempio n. 2
0
 // GPU NVIDIA
 public ComputeDevice(CudaDevice cudaDevice, string group, int GPUCount)
 {
     _cudaDevice       = cudaDevice;
     ID                = (int)cudaDevice.DeviceID;
     Group             = group;
     Name              = cudaDevice.GetName();
     _nameNoNums       = cudaDevice.GetName();
     Enabled           = true;
     DeviceGroupType   = GroupNames.GetType(Group);
     DeviceGroupString = GroupNames.GetNameGeneral(DeviceGroupType);
     IsEtherumCapale   = cudaDevice.IsEtherumCapable();
     DeviceType        = DeviceType.NVIDIA;
     NameCount         = String.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), GPUCount);
     UUID              = cudaDevice.UUID;
 }
Esempio n. 3
0
 // CPU
 public ComputeDevice(int id, string group, string name, int threads, ulong affinityMask, int CPUCount)
 {
     ID                = id;
     Group             = group;
     Name              = name;
     Threads           = threads;
     AffinityMask      = affinityMask;
     _nameNoNums       = name;
     Enabled           = true;
     DeviceGroupType   = GroupNames.GetType(Group);
     DeviceGroupString = GroupNames.GetNameGeneral(DeviceGroupType);
     DeviceType        = DeviceType.CPU;
     NameCount         = String.Format(International.GetText("ComputeDevice_Short_Name_CPU"), CPUCount);
     UUID              = GetUUID(ID, Group, Name, DeviceGroupType);
 }
Esempio n. 4
0
 // GPU NVIDIA
 public ComputeDevice(CudaDevice cudaDevice, string group, bool addToGlobalList = false, bool enabled = true)
 {
     _cudaDevice       = cudaDevice;
     ID                = (int)cudaDevice.DeviceID;
     Group             = group;
     Name              = cudaDevice.GetName();
     _nameNoNums       = cudaDevice.GetName();
     Enabled           = enabled;
     DeviceGroupType   = GroupNames.GetType(Group);
     DeviceGroupString = GroupNames.GetNameGeneral(DeviceGroupType);
     IsEtherumCapale   = cudaDevice.IsEtherumCapable();
     DeviceType        = DeviceType.NVIDIA;
     InitGlobalsList(addToGlobalList);
     NameCount = String.Format(International.GetText("ComputeDevice_Short_Name_NVIDIA_GPU"), ++GPUCount);
     UUID      = cudaDevice.UUID;
 }