From 132ee4c981e3e4fcefc91506306ac827fdcb0307 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 21 Mar 2013 14:56:07 +1100 Subject: [PATCH] Do not scan other gpu platforms if one is specified. --- ocl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ocl.c b/ocl.c index 635090bc..d6045825 100644 --- a/ocl.c +++ b/ocl.c @@ -103,6 +103,9 @@ int clDevicesNum(void) { } for (i = 0; i < numPlatforms; i++) { + if (opt_platform_id >= 0 && (int)i != opt_platform_id) + continue; + status = clGetPlatformInfo( platforms[i], CL_PLATFORM_VENDOR, sizeof(pbuff), pbuff, NULL); if (status != CL_SUCCESS) { applog(LOG_ERR, "Error %d: Getting Platform Info. (clGetPlatformInfo)", status);