Kaydet (Commit) 0d0d3a05 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

make source code opencl 1.0 compliant

Change-Id: Id6055194eb225b85a5c66c5cf9fb44ad342df1a7
üst 19e48764
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment