From 884f83f3138bc5a6d502614e0a64ea8763dfd8cb Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 15 Jul 2012 13:31:03 +1000 Subject: [PATCH] Allow more platforms to be probed if first does not return GPUs. --- ocl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ocl.c b/ocl.c index 2fc7e35f..6ddf5998 100644 --- a/ocl.c +++ b/ocl.c @@ -118,6 +118,8 @@ int clDevicesNum(void) { status = clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, NULL, &numDevices); if (status != CL_SUCCESS) { applog(LOG_ERR, "Error %d: Getting Device IDs (num)", status); + if (i < numPlatforms - 1) + continue; return -1; } applog(LOG_INFO, "Platform %d devices: %d", i, numDevices);