[Libreoffice-commits] core.git: sc/source

Tor Lillqvist tml at collabora.com
Wed Oct 29 08:50:47 PDT 2014


 sc/source/core/inc/openclwrapper.hxx    |    1 -
 sc/source/core/opencl/openclwrapper.cxx |   15 ---------------
 sc/source/core/tool/formulagroup.cxx    |    4 ----
 3 files changed, 20 deletions(-)

New commits:
commit 8007a9d1fc1912ec128199314f69562131eb10fb
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Oct 29 17:48:49 2014 +0200

    sc::opencl::getOpenCLPlatformCount is unneeded
    
    The same information can be seem from the size of the vector reference
    returned by sc::opencl::fillOpenCLInfo().
    
    Change-Id: I797aacdf85a852bc4fa65e0536fd5940aed396a1

diff --git a/sc/source/core/inc/openclwrapper.hxx b/sc/source/core/inc/openclwrapper.hxx
index ef9842a..bc3957f 100644
--- a/sc/source/core/inc/openclwrapper.hxx
+++ b/sc/source/core/inc/openclwrapper.hxx
@@ -88,7 +88,6 @@ public:
     static void setKernelEnv( KernelEnv *envInfo );
 };
 
-size_t getOpenCLPlatformCount();
 const std::vector<OpenCLPlatformInfo>& fillOpenCLInfo();
 
 /**
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index 0f462c0..464d70b 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -754,21 +754,6 @@ bool createPlatformInfo(cl_platform_id nPlatformId, OpenCLPlatformInfo& rPlatfor
 
 }
 
-size_t getOpenCLPlatformCount()
-{
-    int status = clewInit(OPENCL_DLL_NAME);
-    if (status < 0)
-        return 0;
-
-    cl_uint nPlatforms;
-    cl_int nState = clGetPlatformIDs(0, NULL, &nPlatforms);
-
-    if (nState != CL_SUCCESS)
-        return 0;
-
-    return nPlatforms;
-}
-
 const std::vector<OpenCLPlatformInfo>& fillOpenCLInfo()
 {
     static std::vector<OpenCLPlatformInfo> aPlatforms;
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 9d61efa..32e83c6 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -540,10 +540,6 @@ void FormulaGroupInterpreter::fillOpenCLInfo(std::vector<OpenCLPlatformInfo>& rP
 #if !HAVE_FEATURE_OPENCL
     (void) rPlatforms;
 #else
-    size_t nPlatforms = sc::opencl::getOpenCLPlatformCount();
-    if (!nPlatforms)
-        return;
-
     const std::vector<sc::OpenCLPlatformInfo>& rPlatformsFromWrapper =
         sc::opencl::fillOpenCLInfo();
 


More information about the Libreoffice-commits mailing list