From c566605195a3038379be4b7ac4648e6e9bc9d364 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 27 Jun 2011 16:41:39 +1000 Subject: [PATCH] Tab dainbramage. --- ocl.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ocl.c b/ocl.c index 0a2561b8..e858aad1 100644 --- a/ocl.c +++ b/ocl.c @@ -46,40 +46,40 @@ int clDevicesNum() { cl_platform_id platform = NULL; status = clGetPlatformIDs(0, NULL, &numPlatforms); if(status != CL_SUCCESS) - { + { applog(LOG_ERR, "Error: Getting Platforms. (clGetPlatformsIDs)"); return -1; - } + } if(numPlatforms > 0) - { + { cl_platform_id* platforms = (cl_platform_id *)malloc(numPlatforms*sizeof(cl_platform_id)); status = clGetPlatformIDs(numPlatforms, platforms, NULL); if(status != CL_SUCCESS) - { + { applog(LOG_ERR, "Error: Getting Platform Ids. (clGetPlatformsIDs)"); return -1; - } + } unsigned int i; for(i=0; i < numPlatforms; ++i) - { + { char pbuff[100]; status = clGetPlatformInfo( platforms[i], CL_PLATFORM_VENDOR, sizeof(pbuff), pbuff, NULL); if(status != CL_SUCCESS) - { + { applog(LOG_ERR, "Error: Getting Platform Info. (clGetPlatformInfo)"); free(platforms); return -1; - } + } platform = platforms[i]; if(!strcmp(pbuff, "Advanced Micro Devices, Inc.")) - { + { break; } - } + } free(platforms); - } + } if(platform == NULL) { perror("NULL platform found!\n"); @@ -468,7 +468,7 @@ retry: free(rawsource); applog(LOG_INFO, "Initialising kernel with%s BFI_INT patching, %d vectors and worksize %d", - patchbfi ? "" : "out", clState->preferred_vwidth, clState->work_size); + patchbfi ? "" : "out", clState->preferred_vwidth, clState->work_size); /* create a cl program executable for all the devices specified */ status = clBuildProgram(clState->program, 1, &devices[gpu], NULL, NULL, NULL);