Fix handling of CL_DEVICE_TYPE flags

This commit is contained in:
Vsevak 2020-07-31 19:06:32 +03:00
parent adde2439a6
commit db47eeb2a9
1 changed files with 3 additions and 3 deletions

View File

@ -625,9 +625,9 @@ int UCL_Device::set_platform_accelerator(int pid) {
for (int n=0; n<_num_platforms; n++) {
set_platform(n);
for (int i=0; i<num_devices(); i++) {
if (_properties[i].device_type==CL_DEVICE_TYPE_CPU ||
_properties[i].device_type==CL_DEVICE_TYPE_GPU ||
_properties[i].device_type==CL_DEVICE_TYPE_ACCELERATOR) {
if ((_properties[i].device_type & CL_DEVICE_TYPE_CPU) ||
(_properties[i].device_type & CL_DEVICE_TYPE_GPU) ||
(_properties[i].device_type & CL_DEVICE_TYPE_ACCELERATOR)) {
found = 1;
break;
}