summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-09-17 03:09:42 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-09-19 17:03:22 +0200
commite0eba2bc96bcd27a9c92e1a5cc80167b0b962da7 (patch)
tree8bc0445b9907104f2d009bc600de1099cab5f3ea /sc
parentc45f93694f1524247052adfe4722a042725c4288 (diff)
we can still write the next files out if one fails
Change-Id: Ibfb604692f8d5d6f01652af6d6e09339c49be6af
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/opencl/openclwrapper.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index 0c7718fc5234..a9c576dfe0cc 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -258,7 +258,6 @@ int OpenclDevice::writeBinaryToFile( const char* fileName, const char* birary, s
int OpenclDevice::generatBinFromKernelSource( cl_program program, const char * clFileName )
{
cl_uint numDevices;
- char *str = NULL;
cl_int clStatus = clGetProgramInfo( program, CL_PROGRAM_NUM_DEVICES,
sizeof(numDevices), &numDevices, NULL );
@@ -308,7 +307,7 @@ int OpenclDevice::generatBinFromKernelSource( cl_program program, const char * c
sizeof(deviceName), deviceName, NULL);
CHECK_OPENCL( clStatus, "clGetDeviceInfo" );
- str = (char*) strstr( clFileName, (char*) ".cl" );
+ char* str = (char*) strstr( clFileName, (char*) ".cl" );
memcpy( cl_name, clFileName, str - clFileName );
cl_name[str - clFileName] = '\0';
sprintf( fileName, "./%s-%s.bin", cl_name, deviceName );
@@ -316,9 +315,9 @@ int OpenclDevice::generatBinFromKernelSource( cl_program program, const char * c
if ( !writeBinaryToFile( fileName, binaries[i], binarySizes[i] ) )
{
printf("opencl-wrapper: write binary[%s] failds\n", fileName);
- return 0;
- } //else
- printf("opencl-wrapper: write binary[%s] succesfully\n", fileName);
+ }
+ else
+ printf("opencl-wrapper: write binary[%s] succesfully\n", fileName);
}
}