From 8007a9d1fc1912ec128199314f69562131eb10fb Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 29 Oct 2014 17:48:49 +0200 Subject: 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 --- 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(-) diff --git a/sc/source/core/inc/openclwrapper.hxx b/sc/source/core/inc/openclwrapper.hxx index ef9842ab03f1..bc3957f6641c 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& fillOpenCLInfo(); /** diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx index 0f462c07d7a3..464d70bd0ccf 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& fillOpenCLInfo() { static std::vector aPlatforms; diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index 9d61efa195ce..32e83c6efc3c 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -540,10 +540,6 @@ void FormulaGroupInterpreter::fillOpenCLInfo(std::vector& rP #if !HAVE_FEATURE_OPENCL (void) rPlatforms; #else - size_t nPlatforms = sc::opencl::getOpenCLPlatformCount(); - if (!nPlatforms) - return; - const std::vector& rPlatformsFromWrapper = sc::opencl::fillOpenCLInfo(); -- cgit