summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-10-01 01:36:04 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-10-01 01:49:16 +0200
commit0d0d3a0540dad2d0f417e21df1183dfc33964357 (patch)
tree99b7410a66637ce2ec3bdcc7d6cc983a6a4dd716 /sc
parent19e48764f7396e4a462d3a97c4bbe7848572b7d5 (diff)
make source code opencl 1.0 compliant
Change-Id: Id6055194eb225b85a5c66c5cf9fb44ad342df1a7
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/opencl/openclwrapper.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index 6d92708886e1..c59f0557b0c3 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -259,11 +259,12 @@ OString createFileName(cl_device_id deviceId, const char* clFileName)
std::vector<boost::shared_ptr<osl::File> > OpenclDevice::binaryGenerated( const char * clFileName, cl_context context )
{
- cl_uint numDevices=0;
+ size_t numDevices=0;
std::vector<boost::shared_ptr<osl::File> > aGeneratedFiles;
- cl_int clStatus = clGetContextInfo( context, CL_CONTEXT_NUM_DEVICES,
- sizeof(numDevices), &numDevices, NULL );
+ cl_int clStatus = clGetContextInfo( context, CL_CONTEXT_DEVICES,
+ 0, NULL, &numDevices );
+ numDevices /= sizeof(numDevices);
if(clStatus != CL_SUCCESS)
return aGeneratedFiles;
@@ -465,9 +466,10 @@ int OpenclDevice::compileKernelFile( GPUEnv *gpuInfo, const char *buildOption )
idx = gpuInfo->mnFileCount;
- cl_uint numDevices;
- clStatus = clGetContextInfo( gpuInfo->mpContext, CL_CONTEXT_NUM_DEVICES,
- sizeof(numDevices), &numDevices, NULL );
+ size_t numDevices;
+ clStatus = clGetContextInfo( gpuInfo->mpContext, CL_CONTEXT_DEVICES,
+ 0, NULL, &numDevices );
+ numDevices /= sizeof(numDevices);
CHECK_OPENCL( clStatus, "clGetContextInfo" );
std::vector<boost::shared_ptr<osl::File> > aGeneratedFiles = binaryGenerated(