From dbdcfc9a072261079787865e4e1ce60a9047c7a4 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 9 Nov 2011 21:24:47 +0000 Subject: [PATCH] - OpenCL API: check return value from clGetDeviceIDs() svn path=/trunk/boinc/; revision=24566 --- api/boinc_opencl.cpp | 5 +++-- checkin_notes | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/api/boinc_opencl.cpp b/api/boinc_opencl.cpp index 005fcdaad0..9c6b021a85 100644 --- a/api/boinc_opencl.cpp +++ b/api/boinc_opencl.cpp @@ -48,13 +48,14 @@ int boinc_get_opencl_ids_aux( retval = clGetPlatformIDs(MAX_OPENCL_PLATFORMS, platforms, &num_platforms); if (num_platforms == 0) return CL_DEVICE_NOT_FOUND; - if (retval) return retval; + if (retval != CL_SUCCESS) return retval; for (platform_index=0; platform_index= (int)num_devices) continue; @@ -63,7 +64,7 @@ int boinc_get_opencl_ids_aux( retval = clGetDeviceInfo( device_id, CL_DEVICE_VENDOR, sizeof(vendor), vendor, NULL ); - if (retval || strlen(vendor)==0) continue; + if ((retval != CL_SUCCESS) || (strlen(vendor)==0)) continue; if ((strstr(vendor, "AMD")) || (strstr(vendor, "Advanced Micro Devices, Inc.")) diff --git a/checkin_notes b/checkin_notes index 1a7806dcd4..0b50ffe9d0 100644 --- a/checkin_notes +++ b/checkin_notes @@ -8322,3 +8322,9 @@ David 9 Nov 2011 api/ boinc_opencl.cpp + +David 9 Nov 2011 + - OpenCL API: check return value from clGetDeviceIDs() + + api/ + boinc_opencl.cpp