s-u / OpenCL

Interface allowing R to use OpenCL
Other
15 stars 10 forks source link

oclDevices() will fail when no matching devices are found #5

Closed s-u closed 4 years ago

s-u commented 4 years ago

oclDevices() will fail with an error instead of returning an empty list if no matching devices exist.

> OpenCL::oclDevices(type="all")
[[1]]
OpenCL device 'pthread-Intel Xeon E3-12xx v2 (Ivy Bridge, IBRS)'

> OpenCL::oclDevices(type="gpu")
Error in OpenCL::oclDevices(type = "gpu") : 
  clGetDeviceIDs failed (oclError -1)