forked from lijiext/lammps
Fix handling of CL_DEVICE_TYPE flags
This commit is contained in:
parent
adde2439a6
commit
db47eeb2a9
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue