[Libreoffice-commits] core.git: Branch 'feature/calc-pluggable-opencl' - sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Fri Sep 13 08:47:03 PDT 2013
sc/source/core/opencl/openclwrapper.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit edb3cd3dacb45cc8806f4c8018b303879bec2217
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Sep 13 11:47:56 2013 -0400
Correct shared library name per platform.
Change-Id: Ie50661aff48f74ea49162d1f893d3d0fc2ee2165
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index a45241c..a32cf8a 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -33,6 +33,10 @@
#define OCL_CHECK(value1,value2,str) \
if(value1!=value2) \
fprintf(stderr,"[OCL_ERROR] %s\n",str);
+
+#define OPENCL_DLL_NAME "OpenCL.dll"
+#else
+#define OPENCL_DLL_NAME "libOpenCL.so"
#endif
using namespace std;
@@ -46,7 +50,7 @@ int OpenclDevice::initEnv()
{
// TODO: This part needs more platform specific handling. On Windows,
// the GPU Driver itself installs OpenCL.dll in the system folder.
- int status = clewInit("OpenCL.dll");
+ int status = clewInit(OPENCL_DLL_NAME);
if (status < 0)
return 1;
@@ -2693,7 +2697,7 @@ bool createPlatformInfo(cl_platform_id nPlatformId, OpenclPlatformInfo& rPlatfor
void fillOpenCLInfo(std::vector<OpenclPlatformInfo>& rPlatforms)
{
- int status = clewInit("libOpenCL.so");
+ int status = clewInit(OPENCL_DLL_NAME);
if (status < 0)
return;
More information about the Libreoffice-commits
mailing list