Commit 639b0716 authored by peastman's avatar peastman
Browse files

Additional check for unsupported platforms

parent fb68776e
...@@ -173,7 +173,7 @@ OpenCLContext::OpenCLContext(const System& system, int platformIndex, int device ...@@ -173,7 +173,7 @@ OpenCLContext::OpenCLContext(const System& system, int platformIndex, int device
} }
} }
int speed = devices[i].getInfo<CL_DEVICE_MAX_COMPUTE_UNITS>()*processingElementsPerComputeUnit*devices[i].getInfo<CL_DEVICE_MAX_CLOCK_FREQUENCY>(); int speed = devices[i].getInfo<CL_DEVICE_MAX_COMPUTE_UNITS>()*processingElementsPerComputeUnit*devices[i].getInfo<CL_DEVICE_MAX_CLOCK_FREQUENCY>();
if (maxSize >= minThreadBlockSize && speed > bestSpeed) { if (maxSize >= minThreadBlockSize && (speed > bestSpeed || (supported && !bestSupported))) {
bestDevice = i; bestDevice = i;
bestSpeed = speed; bestSpeed = speed;
bestPlatform = j; bestPlatform = j;
......
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