private bool deviceOfTypeInDeviceList(ComputeDevice.DeviceTypes type) { foreach (ComputeDevice computeDevice in ComputeDevices) { if (computeDevice.DeviceType == type) { return(true); } } return(false); }
private ComputeDevice.DeviceTypes getDeviceType(OpenCLNet.Device device) { ComputeDevice.DeviceTypes deviceType = ComputeDevice.DeviceTypes.Unknown; if (device.DeviceType == OpenCLNet.DeviceType.CPU) { deviceType = ComputeDevice.DeviceTypes.Cpu; } if (device.DeviceType == OpenCLNet.DeviceType.GPU) { deviceType = ComputeDevice.DeviceTypes.Gpu; } if (device.DeviceType == OpenCLNet.DeviceType.ACCELERATOR) { deviceType = ComputeDevice.DeviceTypes.Accelerator; } return(deviceType); }