File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,15 @@ inline std::vector<cl::sycl::device> get_intel_sycl_devices(
3636 cl::sycl::info::device_type dev_type) {
3737 const int intel_vendor_id = 0x8086 ;
3838 auto devices = cl::sycl::device::get_devices (dev_type);
39- devices.erase (
40- std::remove_if (devices.begin (), devices.end (),
41- [=](const cl::sycl::device &dev) {
42- return dev.get_info <cl::sycl::info::device::vendor_id>()
43- != intel_vendor_id;
44- }),
39+ devices.erase (std::remove_if (devices.begin (), devices.end (),
40+ [=](const cl::sycl::device &dev) {
41+ auto _vendor_id = dev.get_info <
42+ cl::sycl::info::device::vendor_id>();
43+ auto _dev_type = dev.get_info <
44+ cl::sycl::info::device::device_type>();
45+ return (_vendor_id != intel_vendor_id)
46+ || (_dev_type != dev_type);
47+ }),
4548 devices.end ());
4649 return devices;
4750}
You can’t perform that action at this time.
0 commit comments