sc/Library_scopencl.mk | 3 +-- sc/source/core/opencl/openclwrapper.cxx | 8 +++----- sc/source/core/opencl/openclwrapper.hxx | 8 -------- 3 files changed, 4 insertions(+), 15 deletions(-)
New commits: commit ab683542cd78e225a2e11e405e1cd8cfce99461a Author: Tor Lillqvist <t...@collabora.com> Date: Mon Sep 30 14:27:38 2013 +0300 Revert "Fix OpenCL use on Mac" Nah, do use clew after all. Makes it easier to build against an old SDK. Do always link against the OpenCL framework, though, and use NULL instead of some dylib name as the parameter to clewInit() (and thus dlopen()). This reverts commit d0fdae78797979949ec7ead20ad52b901c8c7e9a. Change-Id: I2ec07ddf60941851ea70523113296627fbd80a0c diff --git a/sc/Library_scopencl.mk b/sc/Library_scopencl.mk index c2ca1f3..cb702e8 100644 --- a/sc/Library_scopencl.mk +++ b/sc/Library_scopencl.mk @@ -36,8 +36,7 @@ $(eval $(call gb_Library_use_libraries,scopencl,\ $(eval $(call gb_Library_add_exception_objects,scopencl,\ sc/source/core/opencl/formulagroupcl \ sc/source/core/opencl/openclwrapper \ - $(if $(filter-out MACOSX,$(OS)), \ - sc/source/core/opencl/clcc/clew) \ + sc/source/core/opencl/clcc/clew \ )) ifeq ($(OS),LINUX) diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx index 50bb0d1..6fa86cc 100644 --- a/sc/source/core/opencl/openclwrapper.cxx +++ b/sc/source/core/opencl/openclwrapper.cxx @@ -41,7 +41,9 @@ fprintf(stderr,"[OCL_ERROR] %s\n",str); #define OPENCL_DLL_NAME "OpenCL.dll" -#elif !defined(MACOSX) +#elif defined(MACOSX) +#define OPENCL_DLL_NAME NULL +#else #define OPENCL_DLL_NAME "libOpenCL.so" #endif @@ -2609,11 +2611,9 @@ bool createPlatformInfo(cl_platform_id nPlatformId, OpenclPlatformInfo& rPlatfor size_t getOpenCLPlatformCount() { -#ifndef MACOSX int status = clewInit(OPENCL_DLL_NAME); if (status < 0) return 0; -#endif cl_uint nPlatforms; cl_int nState = clGetPlatformIDs(0, NULL, &nPlatforms); @@ -2630,11 +2630,9 @@ const std::vector<OpenclPlatformInfo>& fillOpenCLInfo() if(!aPlatforms.empty()) return aPlatforms; -#ifndef MACOSX int status = clewInit(OPENCL_DLL_NAME); if (status < 0) return aPlatforms; -#endif cl_uint nPlatforms; cl_int nState = clGetPlatformIDs(0, NULL, &nPlatforms); diff --git a/sc/source/core/opencl/openclwrapper.hxx b/sc/source/core/opencl/openclwrapper.hxx index 5fd3991..c81c313 100644 --- a/sc/source/core/opencl/openclwrapper.hxx +++ b/sc/source/core/opencl/openclwrapper.hxx @@ -21,16 +21,8 @@ #include <rtl/string.hxx> -#ifdef MACOSX - -#include <OpenCL/cl.h> - -#else - #include "clcc/clew.h" -#endif - // CL_MAP_WRITE_INVALIDATE_REGION is new in OpenCL 1.2. // When compiling against an older OpenCL, use CL_MAP_WRITE. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits