diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-06-29 10:08:38 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-06-29 10:08:38 +0300 |
commit | 34dc6baf2c61f4127e6d8d89c92d8e4c37684ff5 (patch) | |
tree | 45a8f2c8c6285001cafe63122656f8a0284aa53e /sc | |
parent | 2aaa3ae69f710ccecbc60bab8110af0734980c13 (diff) |
Try to fix compilation against an older SDK
Change-Id: Idd4d01c61ccba493554e359bc6ff4298e39633e3
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/openclwrapper.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx index 829283dd5976..09a9f0a4edd7 100644 --- a/sc/source/core/opencl/openclwrapper.cxx +++ b/sc/source/core/opencl/openclwrapper.cxx @@ -419,10 +419,13 @@ int OpenclDevice::CompileKernelFile(GPUEnv *gpuInfo, const char *buildOption) { source_size[0] = strlen(source); binaryExisted = 0; if ((binaryExisted = BinaryGenerated(filename, &fd)) == 1) { +#ifdef CL_CONTEXT_NUM_DEVICES status = clGetContextInfo(gpuInfo->context, CL_CONTEXT_NUM_DEVICES, sizeof(numDevices), &numDevices, NULL); CHECK_OPENCL(status) - +#else + numDevices = 1; // ??? +#endif devices = (cl_device_id*) malloc(sizeof(cl_device_id) * numDevices); if (devices == NULL) { return 0; |