Commit 06a2c7c8 authored by peastman's avatar peastman
Browse files

OpenCLDeviceQuery handles platforms with no devices

parent 260627de
......@@ -47,7 +47,13 @@ int main() {
for (int j = 0; j < platforms.size(); j++) {
vector<cl::Device> devices;
platforms[j].getDevices(CL_DEVICE_TYPE_ALL, &devices);
try {
platforms[j].getDevices(CL_DEVICE_TYPE_ALL, &devices);
}
catch (...) {
// There are no devices available for this platform.
continue;
}
for (int i = 0; i < devices.size(); i++) {
cl::Device d = devices[i];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment