Unverified Commit 75dcd9ae authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #2266 from Vsevak/fix_opencl

Fix handling of CL_DEVICE_TYPE flags
parents 59b5c7c1 db47eeb2
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -625,9 +625,9 @@ int UCL_Device::set_platform_accelerator(int pid) {
    for (int n=0; n<_num_platforms; n++) {
    for (int n=0; n<_num_platforms; n++) {
      set_platform(n);
      set_platform(n);
      for (int i=0; i<num_devices(); i++) {
      for (int i=0; i<num_devices(); i++) {
        if (_properties[i].device_type==CL_DEVICE_TYPE_CPU ||
        if ((_properties[i].device_type & CL_DEVICE_TYPE_CPU) ||
            _properties[i].device_type==CL_DEVICE_TYPE_GPU ||
            (_properties[i].device_type & CL_DEVICE_TYPE_GPU) ||
            _properties[i].device_type==CL_DEVICE_TYPE_ACCELERATOR) {
            (_properties[i].device_type & CL_DEVICE_TYPE_ACCELERATOR)) {
          found = 1;
          found = 1;
          break;
          break;
        }
        }