示例#1
0
        private bool deviceOfTypeInDeviceList(ComputeDevice.DeviceTypes type)
        {
            foreach (ComputeDevice computeDevice in ComputeDevices)
            {
                if (computeDevice.DeviceType == type)
                {
                    return(true);
                }
            }

            return(false);
        }
示例#2
0
        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);
        }