[Libreoffice-commits] core.git: Branch 'private/kohei/formula-opencl-work' - 2 commits - sc/Library_scopencl.mk sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Wed Sep 11 16:24:06 PDT 2013


 sc/Library_scopencl.mk                  |    1 -
 sc/source/core/opencl/openclwrapper.cxx |   11 ++++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 41466b3fcaf58ac717ff475912f99394b5c81e56
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Sep 11 19:21:35 2013 -0400

    OpenCL code shouldn't be needing any UI code.
    
    Change-Id: I789ac7b9c1404b2f7b35178d9c43c59182a20cea

diff --git a/sc/Library_scopencl.mk b/sc/Library_scopencl.mk
index 0ec2b47..0eab89eb 100644
--- a/sc/Library_scopencl.mk
+++ b/sc/Library_scopencl.mk
@@ -21,7 +21,6 @@ $(eval $(call gb_Library_use_sdk_api,scopencl))
 
 $(eval $(call gb_Library_use_libraries,scopencl,\
 	for \
-	forui \
 	sal \
 	sc \
 	$(gb_UWINAPI) \
commit b565942ac7c1ee3222c9b22cfca460cc12f0c5d2
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Sep 11 19:20:54 2013 -0400

    Move the clewInit to where the Windows DLL is manually loaded.
    
    Change-Id: I58c8bcbd76c28c458fb28c21d65887159fa0ea34

diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index f186df1..0cad340 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -73,6 +73,11 @@ void OpenclDevice::freeOpenclDll()
 
 int OpenclDevice::initEnv()
 {
+    // TODO: Make the path configurable.
+    int status = clewInit("/opt/AMDAPP/lib/x86_64/libOpenCL.so");
+    if (status < 0)
+        return 1;
+
 #ifdef WIN32
     while( 1 )
     {
@@ -707,10 +712,6 @@ int OpenclDevice::runKernel( const char *kernelName, void **userdata)
 
 int OpenclDevice::initOpenclRunEnv( int argc )
 {
-    int status = clewInit("/opt/AMDAPP/lib/x86_64/libOpenCL.so");
-    if (status < 0)
-        return 1;
-
     if ( MAX_CLKERNEL_NUM <= 0 )
     {
         return 1;
@@ -722,7 +723,7 @@ int OpenclDevice::initOpenclRunEnv( int argc )
     {
         registOpenclKernel();
         //initialize devices, context, comand_queue
-        status = initOpenclRunEnv( &gpuEnv );
+        int status = initOpenclRunEnv( &gpuEnv );
         if ( status )
         {
             printf("init_opencl_env failed.\n");


More information about the Libreoffice-commits mailing list